mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
elf: pretty print alingment when pretty printing atoms
This commit is contained in:
parent
39ee346681
commit
df80ccf760
1 changed files with 3 additions and 3 deletions
|
|
@ -1022,7 +1022,7 @@ pub fn format(
|
|||
_ = unused_fmt_string;
|
||||
_ = options;
|
||||
_ = writer;
|
||||
@compileError("do not format symbols directly");
|
||||
@compileError("do not format Atom directly");
|
||||
}
|
||||
|
||||
pub fn fmt(atom: Atom, elf_file: *Elf) std.fmt.Formatter(format2) {
|
||||
|
|
@ -1048,8 +1048,8 @@ fn format2(
|
|||
const atom = ctx.atom;
|
||||
const elf_file = ctx.elf_file;
|
||||
try writer.print("atom({d}) : {s} : @{x} : shdr({d}) : align({x}) : size({x})", .{
|
||||
atom.atom_index, atom.name(elf_file), atom.address(elf_file),
|
||||
atom.output_section_index, atom.alignment, atom.size,
|
||||
atom.atom_index, atom.name(elf_file), atom.address(elf_file),
|
||||
atom.output_section_index, atom.alignment.toByteUnits() orelse 0, atom.size,
|
||||
});
|
||||
if (atom.fdes(elf_file).len > 0) {
|
||||
try writer.writeAll(" : fdes{ ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue