]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
When bfd/pdp11.c was copied from bfd/aoutx.h, the #defines for external symbol types...
authorStephen Casner <casner@acm.org>
Mon, 20 Apr 2020 11:49:50 +0000 (12:49 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 20 Apr 2020 11:49:50 +0000 (12:49 +0100)
commit23c8270e9dc60bb78c1800b7deedc117efdb9e92
treeeef82324bea47060d20bdfc2377f8a7cc7ff3c24
parentc2e5c986b3825c16a578e5bf84aa412eec276dc7
When bfd/pdp11.c was copied from bfd/aoutx.h, the #defines for external symbol types N_TEXT etc. were #undef'd and then #define'd with new values.  But N_STAB was not changed even though the new value for N_EXT overlapped with it.  This caused aout_link_write_symbols() to treat global symbols referenced in the source but defined in a linker script as undefined.

Separately, in translate_symbol_table() the 16-bit symbol values were sign extended to unsigned long (e.g., 64 bits) when they really should be treated as unsigned so the value remains 16 bits.

PR 25828
* pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT
causing globals from linker script to be treated as debug symbols.
(translate_symbol_table): Don't sign-extend symbol values from 16
to 64 bits in nm output.
bfd/ChangeLog
bfd/pdp11.c