Commit 939e4d81e1

d18g <gootvilig.davidhai@gmail.com>
2023-06-20 22:06:39
Update objcopy.zig
Fix `--only-section=` handling
1 parent da1f457
Changed files (1)
src/objcopy.zig
@@ -66,7 +66,7 @@ pub fn cmdObjCopy(
         } else if (mem.eql(u8, arg, "--listen=-")) {
             listen = true;
         } else if (mem.startsWith(u8, arg, "--only-section=")) {
-            only_section = arg["--output-target=".len..];
+            only_section = arg["--only-section=".len..];
         } else if (mem.eql(u8, arg, "--pad-to")) {
             i += 1;
             if (i >= args.len) fatal("expected another argument after '{s}'", .{arg});