authorgravatar for kcbanner@gmail.comCasey Banner <kcbanner@gmail.com> 2026-06-05 01:55:36-04:00
committergravatar for kcbanner@gmail.comCasey Banner <kcbanner@gmail.com> 2026-06-23 00:26:57-04:00
logc6d0c68141ebd8059bf5e7cdc5f1b4117e62e64a
tree27b4f0d5305a58872c88040c1e2a81678c65c4cd
parentb2eee06bd67e720014809ade89b0b054865b0040

objdump: fixup incorrect dumping of implib objects


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

lib/compiler/objdump.zig+5-4
......@@ -413,8 +413,9 @@ const coff = struct {
413413 try w.writeAll(str);
414414 try w.writeByte('\n');
415415 }
416 try w.writeByte('\n');
417416 }
417
418 try w.writeByte('\n');
418419 }
419420
420421 opt_expected_kind = null;
......@@ -444,7 +445,6 @@ const coff = struct {
444445 const sig = std.mem.readInt(u16, member_sig[2..4], .little);
445446
446447 const is_imp_lib = machine == std.coff.IMAGE.FILE.MACHINE.UNKNOWN and sig == 0xffff;
447
448448 if (opts.member_headers or (opts.exports and is_imp_lib)) {
449449 try dumpArchiveHeader(w, &header, member.offset);
450450 if (is_imp_lib) {
......@@ -493,6 +493,7 @@ const coff = struct {
493493 try w.writeByte('\n');
494494 }
495495
496 if (is_imp_lib) continue;
496497 if (opts.section_headers or
497498 opts.file_headers or
498499 opts.relocs or
......@@ -678,7 +679,7 @@ const coff = struct {
678679 if (load_sections) {
679680 if (opts.section_headers)
680681 try w.print(
681 \\Sections in {s}:
682 \\Sections in '{s}':
682683 \\Num Name RVA Virt Size Data Size & Data & Relocs & Lines # Relocs # Lines Flags
683684 \\
684685 , .{obj_name});
......@@ -747,7 +748,7 @@ const coff = struct {
747748
748749 if (opts.symbols)
749750 try w.print(
750 \\Symbols in {s}:
751 \\Symbols in '{s}':
751752 \\ Ord Value Sect Type Storage Name
752753 \\
753754 , .{obj_name});