This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Properly report local symbol
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sources dot redhat dot com
- Date: Sat, 13 Jun 2009 22:47:25 -0700
- Subject: PATCH: Properly report local symbol
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
I checked in this patch to properly report local symbol for unhandled
relocation against STT_GNU_IFUNC symbol since we fake ELF hash entry
for local STT_GNU_IFUNC symbol.
H.J.
---
Index: ChangeLog
===================================================================
--- ChangeLog (revision 6114)
+++ ChangeLog (working copy)
@@ -1,5 +1,12 @@
2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
+ * elf32-i386.c (elf_i386_check_relocs): Properly report
+ local symbol for unhandled relocation against STT_GNU_IFUNC
+ symbol.
+ * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
+
+2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
+
PR ld/10269
* elf32-i386.c: Include "objalloc.h" and "hashtab.h".
(elf_i386_link_hash_table): Add loc_hash_table and
Index: elf64-x86-64.c
===================================================================
--- elf64-x86-64.c (revision 6114)
+++ elf64-x86-64.c (working copy)
@@ -1263,7 +1263,8 @@ elf64_x86_64_check_relocs (bfd *abfd, st
(_("%B: relocation %s against STT_GNU_IFUNC "
"symbol `%s' isn't handled by %s"), abfd,
x86_64_elf_howto_table[r_type].name,
- h != NULL ? h->root.root.string : "a local symbol",
+ (h->root.root.string
+ ? h->root.root.string : "a local symbol"),
__FUNCTION__);
bfd_set_error (bfd_error_bad_value);
return FALSE;
Index: elf32-i386.c
===================================================================
--- elf32-i386.c (revision 6114)
+++ elf32-i386.c (working copy)
@@ -1480,7 +1480,8 @@ elf_i386_check_relocs (bfd *abfd,
(_("%B: relocation %s against STT_GNU_IFUNC "
"symbol `%s' isn't handled by %s"), abfd,
elf_howto_table[r_type].name,
- h != NULL ? h->root.root.string : "a local symbol",
+ (h->root.root.string
+ ? h->root.root.string : "a local symbol"),
__FUNCTION__);
bfd_set_error (bfd_error_bad_value);
return FALSE;