objcopy: delete most of it

this code is not up to zig project standards

tracked by #24522

oh, and fix not adjusting buffer seek position in std.fs.File.Reader
This commit is contained in:
Andrew Kelley
2025-07-20 16:43:47 -07:00
parent f2a3ac7c05
commit f1576ef14c
5 changed files with 240 additions and 1142 deletions

View File

@@ -310,7 +310,8 @@ pub fn main() !void {
build_all_path, libc_so_path, @errorName(err),
});
};
const header = try elf.Header.parse(elf_bytes[0..@sizeOf(elf.Elf64_Ehdr)]);
var stream: std.Io.Reader = .fixed(elf_bytes);
const header = try elf.Header.read(&stream);
const parse: Parse = .{
.arena = arena,