authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-08-13 12:01:56+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-08-13 13:30:24+02:00
logdf80ccf7600818faafd485b4c01bd4fe0f26a8e5
treeecbae78863b4a263fd0405e19d88e29f559fdba6
parent39ee346681eac850f2f1f9bcb8ca6114dbad581a

elf: pretty print alingment when pretty printing atoms


1 files changed, 3 insertions(+), 3 deletions(-)

src/link/Elf/Atom.zig+3-3
......@@ -1022,7 +1022,7 @@ pub fn format(
10221022 _ = unused_fmt_string;
10231023 _ = options;
10241024 _ = writer;
1025 @compileError("do not format symbols directly");
1025 @compileError("do not format Atom directly");
10261026}
10271027
10281028pub fn fmt(atom: Atom, elf_file: *Elf) std.fmt.Formatter(format2) {
......@@ -1048,8 +1048,8 @@ fn format2(
10481048 const atom = ctx.atom;
10491049 const elf_file = ctx.elf_file;
10501050 try writer.print("atom({d}) : {s} : @{x} : shdr({d}) : align({x}) : size({x})", .{
1051 atom.atom_index, atom.name(elf_file), atom.address(elf_file),
1052 atom.output_section_index, atom.alignment, atom.size,
1051 atom.atom_index, atom.name(elf_file), atom.address(elf_file),
1052 atom.output_section_index, atom.alignment.toByteUnits() orelse 0, atom.size,
10531053 });
10541054 if (atom.fdes(elf_file).len > 0) {
10551055 try writer.writeAll(" : fdes{ ");