[3/8] gas: print full-width symbol values

Message ID 4b40e069-93ad-43ba-97e6-8732f0d9055d@suse.com
State New
Headers
Series gas/x86: towards better Intel syntax expression evaluation |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply

Commit Message

Jan Beulich March 27, 2026, 2:11 p.m. UTC
  The true (rather than truncated) value may be relevant to know if one is
already resorting to print_{expr,symbol}().
  

Patch

--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -3227,7 +3227,7 @@  print_symbol_value_1 (FILE *file, symbol
 
       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)
@@ -3235,8 +3235,8 @@  print_symbol_value_1 (FILE *file, symbol
       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, ">");