aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-04-16 18:02:10 +0100
committerNick Clifton <nickc@redhat.com>2020-04-16 18:02:10 +0100
commit8e4979ac1ea78147ecbcbf81af5e946873dda079 (patch)
tree252ac62bb315754080925a2bca4cb3f4db59a4f0 /bfd/elfxx-mips.c
parent7a1a12f4d1c6152017142d74c736dc1cc6b0e81c (diff)
downloadgdb-8e4979ac1ea78147ecbcbf81af5e946873dda079.zip
gdb-8e4979ac1ea78147ecbcbf81af5e946873dda079.tar.gz
gdb-8e4979ac1ea78147ecbcbf81af5e946873dda079.tar.bz2
Stop the MIPS assembler from accepting ifunc symbols.
PR 25803 gas * config/obj-elf.c (obj_elf_type): Reject ifunc symbols on MIPS targets. * testsuite/gas/elf/elf.exp: Add MIPS targets to the list to skip for the type-2 test. * testsuite/gas/elf/type-noifunc.e: Update to allow for MIPS targets running this test. bfd * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an abort with a more helpful error message.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index ae84782..2f26d7a 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -9311,12 +9311,21 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
hmips = (struct mips_elf_link_hash_entry *) h;
/* Make sure we know what is going on here. */
- BFD_ASSERT (dynobj != NULL
- && (h->needs_plt
- || h->is_weakalias
- || (h->def_dynamic
- && h->ref_regular
- && !h->def_regular)));
+ if (dynobj == NULL
+ || (! h->needs_plt
+ && ! h->is_weakalias
+ && (! h->def_dynamic
+ || ! h->ref_regular
+ || h->def_regular)))
+ {
+ if (h->type == STT_GNU_IFUNC)
+ _bfd_error_handler (_("IFUNC symbol %s in dynamic symbol table - IFUNCS are not supported"),
+ h->root.root.string);
+ else
+ _bfd_error_handler (_("non-dynamic symbol %s in dynamic symbol table"),
+ h->root.root.string);
+ return TRUE;
+ }
hmips = (struct mips_elf_link_hash_entry *) h;