Make undefined symbols in allocate_dynrelocs dynamic
authorAlan Modra <amodra@gmail.com>
Tue, 22 Aug 2017 23:28:08 +0000 (08:58 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 22 Aug 2017 23:28:08 +0000 (08:58 +0930)
commit46434633f9cee98afac1cf945ad00c9d4fdf5a4d
treed1a7aff7763c817abd2f2d9561759cf35441cd2f
parentbb4b64b0dbe015a4b3fb3993273f8b9b0f8cb421
Make undefined symbols in allocate_dynrelocs dynamic

..if they have dynamic relocs.  An undefined symbol in a PIC object
that finds no definition ought to become dynamic in order to support
--allow-shlib-undefined, but there is nothing in the generic ELF
linker code to do this if the reference isn't via the GOT or PLT.  (An
initialized function pointer is an example.)  So it falls to backend
code to ensure the symbol is made dynamic.

PR 21988
* elf64-ppc.c (ensure_undef_dynamic): Rename from
ensure_undefweak_dynamic.  Handle undefined too.
* elf32-ppc.c (ensure_undef_dynamic): Likewise.
* elf32-hppa.c (ensure_undef_dynamic): Likewise.
(allocate_dynrelocs): Discard undefined non-default visibility
relocs first.  Make undefined syms dynamic.  Tidy goto.
bfd/ChangeLog
bfd/elf32-hppa.c
bfd/elf32-ppc.c
bfd/elf64-ppc.c
This page took 0.039519 seconds and 4 git commands to generate.