diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-09-12 18:17:35 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-09-12 18:17:35 +0000 |
commit | 938231c010fd0f6fc3c1fb0694abe7f69602327f (patch) | |
tree | ad8da85c0b13b7bf46474df8e3db6f396764c3de /bfd/elf-ifunc.c | |
parent | 651c9a8e90ae1853cfb699a06076e01968946479 (diff) | |
download | binutils-redhat-938231c010fd0f6fc3c1fb0694abe7f69602327f.tar.gz |
Use .got.plt for IFUNC symbols if there are no GOT relocations.
bfd/
2011-09-12 H.J. Lu <hongjiu.lu@intel.com>
PR ld/13178
* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Use .got.plt
if there are no GOT relocations.
ld/testsuite/
2011-09-12 H.J. Lu <hongjiu.lu@intel.com>
PR ld/13178
* ld-ifunc/ifunc-13-i386.d: Updated.
* ld-ifunc/ifunc-13-x86-64.d: Likewise.
* ld-ifunc/ifunc-3a-x86.d: Likewise.
* ld-x86-64/pr13082-5a.d: Likewise.
* ld-ifunc/ifunc-15-i386.d: New.
* ld-ifunc/ifunc-15-i386.s: Likewise.
* ld-ifunc/ifunc-15-x86-64.d: Likewise.
* ld-ifunc/ifunc-15-x86-64.s: Likewise.
Diffstat (limited to 'bfd/elf-ifunc.c')
-rw-r--r-- | bfd/elf-ifunc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bfd/elf-ifunc.c b/bfd/elf-ifunc.c index 81429b8433..3ba96c7961 100644 --- a/bfd/elf-ifunc.c +++ b/bfd/elf-ifunc.c @@ -299,9 +299,10 @@ keep: 5. Otherwise use .got so that it can be shared among different objects at run-time. We only need to relocate .got entry in shared object. */ - if ((info->shared - && (h->dynindx == -1 - || h->forced_local)) + if (h->got.refcount <= 0 + || (info->shared + && (h->dynindx == -1 + || h->forced_local)) || (!info->shared && !h->pointer_equality_needed) || (info->executable && info->shared) |