Closed leecannon closed 1 month ago
Would use this in TigerBeetle as well!
This is a contributor friendly issue, you don't even need to rebuild the compiler to work on it. Just edit lib/compiler/objcopy.zig
and you're off to the races.
I should add here that I did not remove the pre-existing restriction that zig objdump currently only supports ELF input files with sections that are ordered by their increasing file offset, see: https://github.com/ziglang/zig/blob/73de620ad50121bacb0b9b376efd50b5444485b8/lib/compiler/objcopy.zig#L1125-L1135
Probably related #14717. I may create a PR to allow this some time.
I currently fork out to the system
objcopy
to insert a new section into a binary.It would be nice if
zig objcopy
/std.Build.Step.ObjCopy
supported this use case.Status quo: