aboutsummaryrefslogtreecommitdiff
path: root/src/link/Elf/Atom.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2024-08-13 12:01:56 +0200
committerJakub Konka <kubkon@jakubkonka.com>2024-08-13 13:30:24 +0200
commitdf80ccf7600818faafd485b4c01bd4fe0f26a8e5 (patch)
treeecbae78863b4a263fd0405e19d88e29f559fdba6 /src/link/Elf/Atom.zig
parent39ee346681eac850f2f1f9bcb8ca6114dbad581a (diff)
downloadzig-df80ccf7600818faafd485b4c01bd4fe0f26a8e5.tar.gz
zig-df80ccf7600818faafd485b4c01bd4fe0f26a8e5.zip
elf: pretty print alingment when pretty printing atoms
Diffstat (limited to 'src/link/Elf/Atom.zig')
-rw-r--r--src/link/Elf/Atom.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/link/Elf/Atom.zig b/src/link/Elf/Atom.zig
index e067e53c10..6e68b84952 100644
--- a/src/link/Elf/Atom.zig
+++ b/src/link/Elf/Atom.zig
@@ -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{ ");