diff options
author | Alan Modra <amodra@gmail.com> | 2019-10-07 13:37:23 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-10-07 13:37:23 +1030 |
commit | 847d518374be1c73b812e312a26341115d3f6f5a (patch) | |
tree | 27fe3429795ec071efde47db3ab4adf691bf1a7b /bfd/ChangeLog | |
parent | c3614cffc85be28c07ff5320fe5554e6717ee87c (diff) | |
download | gdb-847d518374be1c73b812e312a26341115d3f6f5a.zip gdb-847d518374be1c73b812e312a26341115d3f6f5a.tar.gz gdb-847d518374be1c73b812e312a26341115d3f6f5a.tar.bz2 |
Bogus "final link failed" messages
This patch is a result of noticing messages like the following:
tmpdir/tls32.o: in function `_start':
(.text+0x1c): unresolvable R_PPC_REL24 relocation against symbol `__tls_get_addr_opt'
./ld-new: final link failed: symbol needs debug section which does not exist
The "needs debug section" comes from attempting to use debug info to
find source line information to print the first error message. That
error isn't of interest to the user, and any previous bfd_error value
which might be of interest is overwritten. So save and restore
bfd_error around the fancy error reporting code.
That still doesn't leave us with a clean bfd_error. Now we get
./ld-new: final link failed: nonrepresentable section on output
An unresolvable relocation surely doesn't mean there is some bfd
section that ld doesn't know how to output! Digging into that showed
a _bfd_elf_section_from_bfd_section failure attempting to find an elf
section correcsponding to ".interp". So don't go looking for elf
sections on linker created bfd sections.
And then fix the linker testsuite which expected the bogus message..
bfd/
* elflink.c (elf_fixup_link_order): Don't attempt to find
an elf_section for linker created bfd sections.
ld/
* ldmisc.c (vfinfo): Save and restore bfd_error around bfd
function calls that might set it.
* testsuite/ld-elf/indirect.exp: Don't expect "nonrepresentable
section" message.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b691d58..607f37c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2019-10-07 Alan Modra <amodra@gmail.com> + * elflink.c (elf_fixup_link_order): Don't attempt to find + an elf_section for linker created bfd sections. + +2019-10-07 Alan Modra <amodra@gmail.com> + * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD with non-local symbol. Don't double count __tls_get_addr calls with marker relocs. |