Change nm so that when it is running in POSIX compatible mode, it does not prefix...
authorNick Clifton <nickc@redhat.com>
Wed, 1 May 2019 13:43:06 +0000 (14:43 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 1 May 2019 13:43:06 +0000 (14:43 +0100)
commit25a0274483cb00c27945b0337005be4f169ff09f
treefab4316a57abf496815976519035e1b6de638d65
parentf59f30f55776b10d4f728065e9f9a10cf63a1b29
Change nm so that when it is running in POSIX compatible mode, it does not prefix symbol values with 0.

PR 24507
* nm.c: (print_format): New variable.
(value_format_32bit, value_format_64bit): Delete.
(set_print_radix): Remove code to alter value_format strings.
(set_output_format): Record chosen format in print_format.
(get_print_format): New function - constructs a printf formatting
string according to the requirements of size, radix, and output
format.
(print_value): Use get_print_format.
* testsuite/binutils-all/nm.exp: Add tests of "nm --format=posix"
and "nm -t d".
binutils/ChangeLog
binutils/nm.c
binutils/testsuite/binutils-all/nm.exp