Initialize GOT slot for local symbol in non-PIC link.
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 21 Jul 2018 13:00:40 +0000 (15:00 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 21 Jul 2018 13:00:40 +0000 (15:00 +0200)
commit2376f038d10f901d3e1a2777407f350e4e54d284
tree7d80c2fc6aa6cfda5fdb5db70403420070de27d1
parent0ee6c332f36222a73abee41bc5168bacf78c9189
Initialize GOT slot for local symbol in non-PIC link.

On ARM/VxWorks 7, the R_ARM_TARGET2 relocation used for exception handling
is R_ARM_GOT_PREL; moreover in Ada you can define local exceptions. In this
case, you may end up with a GOT relocation against a local symbol in a
non-PIC link and the ARM linker leaves the GOT slot uninitialized, unlike
for example the i386 or the SPARC linkers in the same situation.

bfd/
* elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
cleanup for the case of a global symbol that binds locally.  Also
install a value in the GOT slot in the case of a local symbol in
a non-PIC link.
bfd/ChangeLog
bfd/elf32-arm.c