aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/elf32-i386.c2
-rw-r--r--bfd/elf64-x86-64.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index e375e18..507a076 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1607,6 +1607,8 @@ elf_i386_scan_relocs (bfd *abfd,
/* Fake a STT_GNU_IFUNC symbol. */
h->root.root.string = bfd_elf_sym_name (abfd, symtab_hdr,
isym, NULL);
+ if (h->root.root.string == bfd_symbol_error_name)
+ goto error_return;
h->type = STT_GNU_IFUNC;
h->def_regular = 1;
h->ref_regular = 1;
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 236cff9..620b6a3 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -2590,6 +2590,9 @@ elf_x86_64_scan_relocs (bfd *abfd, struct bfd_link_info *info,
/* Fake a STT_GNU_IFUNC symbol. */
h->root.root.string = bfd_elf_sym_name (abfd, symtab_hdr,
isym, NULL);
+ if (h->root.root.string == bfd_symbol_error_name)
+ goto error_return;
+
h->type = STT_GNU_IFUNC;
h->def_regular = 1;
h->ref_regular = 1;