aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-07-16 14:23:12 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-07-16 14:23:12 +0000
commit1f85278f1750261761fe5177ccd6b95633f50217 (patch)
tree3ef6a7722f7ddb3e674e62124a48e420c41463d2 /bfd
parent9a6f4e976ddfb067ae1e954a03d8887d60956cbc (diff)
downloadgdb-1f85278f1750261761fe5177ccd6b95633f50217.zip
gdb-1f85278f1750261761fe5177ccd6b95633f50217.tar.gz
gdb-1f85278f1750261761fe5177ccd6b95633f50217.tar.bz2
bfd/
2009-07-16 H.J. Lu <hongjiu.lu@intel.com> * elf32-i386.c (elf_i386_relocate_section): Don't get local STT_GNU_IFUNC symbol for relocatable link. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. ld/testsuite/ 2009-07-16 H.J. Lu <hongjiu.lu@intel.com> * ld-ifunc/ifunc-5r-local-i386.d: New. * ld-ifunc/ifunc-5r-local-x86-64.d: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-i386.c3
-rw-r--r--bfd/elf64-x86-64.c3
3 files changed, 10 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c433df7..79a75d9 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): Don't get local
+ STT_GNU_IFUNC symbol for relocatable link.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+
2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
* bfdio.c (bfd_iovec): Add comments for bmmap.
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index c86d00d..868e9d4 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -2891,7 +2891,8 @@ elf_i386_relocate_section (bfd *output_bfd,
break;
}
}
- else if (ELF32_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
+ else if (!info->relocatable
+ && ELF32_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
{
/* Relocate against local STT_GNU_IFUNC symbol. */
h = elf_i386_get_local_sym_hash (htab, input_bfd,
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 6e868b3..718f076 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -2612,7 +2612,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
&sec, rel);
/* Relocate against local STT_GNU_IFUNC symbol. */
- if (ELF64_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
+ if (!info->relocatable
+ && ELF64_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
{
h = elf64_x86_64_get_local_sym_hash (htab, input_bfd,
rel, FALSE);