Update objcopy.zig

Fix `--only-section=` handling
This commit is contained in:
d18g 2023-06-20 23:06:39 +03:00 committed by Andrew Kelley
parent da1f457e3b
commit 939e4d81e1

View File

@ -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});