[GOLD] PR22602, handle __tls_get_addr forwarders properly
authorAlan Modra <amodra@gmail.com>
Fri, 15 Dec 2017 04:29:58 +0000 (14:59 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 15 Dec 2017 04:39:15 +0000 (15:09 +1030)
commit2778747c56d0837ec7defb80e756a7e6ca81b8ce
tree7ab40351ac51653621c4430ee1bfe7a5e4be3a8b
parent828d584679845b6a1d01151f7df3592d15fe8405
[GOLD] PR22602, handle __tls_get_addr forwarders properly

We never need to resolve_forwards() a symbol found by hash table lookup
such as target->tls_get_addr_opt() but we do potentially need to do so
for random symbols seen on relocs.  So these calls were in the wrong
order, resulting in missing stubs and an assertion failure.

PR 22602
* powerpc.cc (Target_powerpc::Branch_info::mark_pltcall): Resolve
forwards before replacing __tls_get_addr.
(Target_powerpc::Branch_info::make_stub): Likewise.
gold/ChangeLog
gold/powerpc.cc