authorgravatar for jacwil014@gmail.comjacwil <jacwil014@gmail.com> 2024-01-14 14:16:10-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-22 21:29:21-08:00
log68ea1121fc73d35311b29d15b731a3e424867265
tree8d3694dadbcc899c417f8e5820fc12b426659ca9
parenteeec34ccb6189a588b1227a57e7c7b98af849b8d

objcopy ofmt=hex iterates through segments instead of sections


1 files changed, 2 insertions(+), 4 deletions(-)

src/objcopy.zig+2-4
...@@ -284,10 +284,8 @@ fn emitElf(...@@ -284,10 +284,8 @@ fn emitElf(
284 }284 }
285285
286 var hex_writer = HexWriter{ .out_file = out_file };286 var hex_writer = HexWriter{ .out_file = out_file };
287 for (binary_elf_output.sections.items) |section| {287 for (binary_elf_output.segments.items) |segment| {
288 if (section.segment) |segment| {288 try hex_writer.writeSegment(segment, in_file);
289 try hex_writer.writeSegment(segment, in_file);
290 }
291 }289 }
292 if (options.pad_to) |_| {290 if (options.pad_to) |_| {
293 // Padding to a size in hex files isn't applicable291 // Padding to a size in hex files isn't applicable