[binutils-gdb] gas: print full-width symbol values
Jan Beulich
jbeulich@sourceware.org
Fri Apr 10 06:44:13 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0b1b1d661542862a20f77a2a0f9049926ac37569
commit 0b1b1d661542862a20f77a2a0f9049926ac37569
Author: Jan Beulich <jbeulich@suse.com>
Date: Fri Apr 10 08:42:32 2026 +0200
gas: print full-width symbol values
The true (rather than truncated) value may be relevant to know if one is
already resorting to print_{expr,symbol}().
Diff:
---
gas/symbols.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gas/symbols.c b/gas/symbols.c
index 8b911ae86a8..ef02f1dcc60 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -3256,7 +3256,7 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
if (s != undefined_section
&& s != expr_section)
- fprintf (file, " %lx", (unsigned long) S_GET_VALUE (sym));
+ fprintf (file, " %"PRIx64, (uint64_t) S_GET_VALUE (sym));
}
else if (indent_level < max_indent_level
&& S_GET_SEGMENT (sym) != undefined_section)
@@ -3264,8 +3264,8 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
indent_level++;
fprintf (file, "\n%*s<", indent_level * 4, "");
if (sym->flags.local_symbol)
- fprintf (file, "constant %lx",
- (unsigned long) ((struct local_symbol *) sym)->value);
+ fprintf (file, "constant %"PRIx64,
+ (uint64_t) ((struct local_symbol *) sym)->value);
else
print_expr_1 (file, &sym->x->value);
fprintf (file, ">");
More information about the Binutils-cvs
mailing list