diff options
| author | jacwil <jacwil014@gmail.com> | 2024-01-14 14:16:10 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-01-22 21:29:21 -0800 |
| commit | 68ea1121fc73d35311b29d15b731a3e424867265 (patch) | |
| tree | 8d3694dadbcc899c417f8e5820fc12b426659ca9 /src | |
| parent | eeec34ccb6189a588b1227a57e7c7b98af849b8d (diff) | |
| download | zig-68ea1121fc73d35311b29d15b731a3e424867265.tar.gz zig-68ea1121fc73d35311b29d15b731a3e424867265.zip | |
objcopy ofmt=hex iterates through segments instead of sections
Diffstat (limited to 'src')
| -rw-r--r-- | src/objcopy.zig | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/objcopy.zig b/src/objcopy.zig index 1dc081f2bb..8ea0eaac59 100644 --- a/src/objcopy.zig +++ b/src/objcopy.zig @@ -284,10 +284,8 @@ fn emitElf( } var hex_writer = HexWriter{ .out_file = out_file }; - for (binary_elf_output.sections.items) |section| { - if (section.segment) |segment| { - try hex_writer.writeSegment(segment, in_file); - } + for (binary_elf_output.segments.items) |segment| { + try hex_writer.writeSegment(segment, in_file); } if (options.pad_to) |_| { // Padding to a size in hex files isn't applicable |
