Skip to content
Commit 3c8852fc authored by Alan Modra's avatar Alan Modra
Browse files

PR31096, nm shows 32bit addresses as 64bit addresses

Prior to commit 0e3c1eeb nm output depended on the host unsigned
long when printing "negative" symbol values for 32-bit targets.
Commit 0e3c1eeb made the output match that seen with a 64-bit host
unsigned long.  The fact that nm output changed depending on host is
of course a bug, but it is reasonable to expect 32-bit target output
is only 32 bits.  So this patch makes 32-bit target output the same as
it was on 32-bit hosts prior to 0e3c1eeb.

	PR 31096
	* nm.c (print_format_string): Make it a static buffer.
	(get_print_format): Merge into..
	(set_print_format): ..this, renamed from set_print_width.  When
	print_width is 32, set up print_format_string for an int32_t
	value.  Don't malloc print_format_string.  Adjust calls.
	(print_value): Correct printing of 32-bit values.
parent 9d498f42
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment