diff options
author | Nick Clifton <nickc@redhat.com> | 2020-04-16 18:02:10 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-04-16 18:02:10 +0100 |
commit | 8e4979ac1ea78147ecbcbf81af5e946873dda079 (patch) | |
tree | 252ac62bb315754080925a2bca4cb3f4db59a4f0 /gas/config/obj-elf.c | |
parent | 7a1a12f4d1c6152017142d74c736dc1cc6b0e81c (diff) | |
download | binutils-gdb-8e4979ac1ea78147ecbcbf81af5e946873dda079.tar.gz |
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 'gas/config/obj-elf.c')
-rw-r--r-- | gas/config/obj-elf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index a6dcdaf4a7e..5e7e8f08779 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -2177,6 +2177,10 @@ obj_elf_type (int ignore ATTRIBUTE_UNUSED) && bed->elf_osabi != ELFOSABI_FREEBSD) as_bad (_("symbol type \"%s\" is supported only by GNU " "and FreeBSD targets"), type_name); + /* MIPS targets do not support IFUNCS. */ + else if (bed->target_id == MIPS_ELF_DATA) + as_bad (_("symbol type \"%s\" is not supported by " + "MIPS targets"), type_name); elf_tdata (stdoutput)->has_gnu_osabi |= elf_gnu_osabi_ifunc; type = BSF_FUNCTION | BSF_GNU_INDIRECT_FUNCTION; } |