PR25031, nm reports wrong address on 32bit
authorAlan Modra <amodra@gmail.com>
Tue, 24 Sep 2019 13:17:13 +0000 (22:47 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 25 Sep 2019 00:38:02 +0000 (10:08 +0930)
commit895b6d98785ba89819820aa5f4abed17fbb28c37
tree8e974f542770c107b9fd47586101afe3a5109cfc
parent40ac0077b246e100bfeb918c821bd73562dd176b
PR25031, nm reports wrong address on 32bit

Using saved_format breaks when nm is presented with multiple object
files, some 32-bit and some 64-bit.

PR 25031
* nm.c (print_format_string): New.
(get_print_format): Delete saved_format.  Move earlier.
(set_print_width): Call get_print_format.
(print_value): Use print_format_string.

(cherry picked from commit 352f6bc3e5b23e76d8e6f56fb7db4e57d8f5d5bd)
binutils/ChangeLog
binutils/nm.c