PowerPC64, support medium model access to common symbols
authorAlan Modra <amodra@gmail.com>
Wed, 18 Sep 2019 00:57:23 +0000 (10:27 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 18 Sep 2019 12:02:51 +0000 (21:32 +0930)
commit1bdd8facfbf6f94fa9603f528c7e8bdf91d90bfd
treeb307c6f67e8ee5779a734c7ff2a9b5048fc86b16
parenta3d181d2e784d57ea04728ac2f8f747fa798e78a
PowerPC64, support medium model access to common symbols

Some versions of clang apparently generate non-PIC on powerpc64le to
access common symbols.  Since a common symbol and a strong definition
with the same name should resolve to the strong definition we have the
possibility of non-PIC attempting to access shared library variables.
This is really a clanger since powerpc64le is supposed to be PIC by
default, but let's see if ld can cope by generating .dynbss copies.

* elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
(ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
(ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
needs_copy even if all relocs are in rw sections.
(dec_dynrel_count): Handle TOC16 relocs.
(ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
(ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
semantic change.
bfd/ChangeLog
bfd/elf64-ppc.c
This page took 0.035136 seconds and 4 git commands to generate.