Fix bad interaction between --relax and tls optimisation
authorAlan Modra <amodra@gmail.com>
Wed, 12 Feb 2014 10:34:32 +0000 (21:04 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 12 Feb 2014 11:40:09 +0000 (22:10 +1030)
commit9f7552cff4367fc58246f72223d7a1de84c660b7
treea37cb13f33379a021514dd739f7a5301d3634e85
parent795bc6b3eac9e3f80279df69c05d70fc44eaaa4c
Fix bad interaction between --relax and tls optimisation

Adding long-branch stubs for __tls_get_addr calls that are optimised
away is silly.  It also causes assertion failures on newer object files
that use R_PPC_TLSGD and R_PPC_TLSLD marker relocs, and half-optimised
(ie. broken) code for older object files.

PR 16546
* elf32-ppc.c (ppc_elf_relax_section): Don't build long-branch
stubs for calls to __tls_get_addr that we know will later be
optimised away.
bfd/ChangeLog
bfd/elf32-ppc.c