aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-04-21 22:25:39 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-04-21 22:25:39 +0000
commitaa71524235bce7aa6f0b9ae12aa679ed8c3fd96f (patch)
tree68c9cae6fe2b22d0d42566b803dd8b3b5540d302 /bfd/elf32-i386.c
parentf6df62c820e674bda7550f998e83f8b95f22d0fb (diff)
downloadgdb-aa71524235bce7aa6f0b9ae12aa679ed8c3fd96f.zip
gdb-aa71524235bce7aa6f0b9ae12aa679ed8c3fd96f.tar.gz
gdb-aa71524235bce7aa6f0b9ae12aa679ed8c3fd96f.tar.bz2
Skip local IFUNC symbols when checking dynamic relocs in read-only sections.
bfd/ 2011-04-21 H.J. Lu <hongjiu.lu@intel.com> PR ld/12694 * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC symbols. * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise. ld/testsuite/ 2011-04-21 H.J. Lu <hongjiu.lu@intel.com> PR ld/12694 * ld-ifunc/ifunc-14-i386.d: New. * ld-ifunc/ifunc-14-x86-64.d: Likewise. * ld-ifunc/ifunc-14a.s: Likewise. * ld-ifunc/ifunc-14b.s: Likewise.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 1bdc05e..bb79f89 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -2384,6 +2384,10 @@ elf_i386_readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
if (h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ /* Skip local IFUNC symbols. */
+ if (h->forced_local && h->type == STT_GNU_IFUNC)
+ return TRUE;
+
eh = (struct elf_i386_link_hash_entry *) h;
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{