diff options
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/obj-elf.c | 14 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 4c68779..3d80ecc 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -1664,6 +1664,20 @@ obj_elf_type (int ignore ATTRIBUTE_UNUSED) } } } + else if (strcmp (typename, "gnu_indirect_function") == 0 + || strcmp (typename, "10") == 0 + || strcmp (typename, "STT_GNU_IFUNC") == 0) + { + const struct elf_backend_data *bed; + + bed = get_elf_backend_data (stdoutput); + if (!(bed->elf_osabi == ELFOSABI_LINUX + /* GNU/Linux is still using the default value 0. */ + || bed->elf_osabi == ELFOSABI_NONE)) + as_bad (_("symbol type \"%s\" is supported only by GNU targets"), + typename); + type = BSF_FUNCTION | BSF_GNU_INDIRECT_FUNCTION; + } #ifdef md_elf_symbol_type else if ((type = md_elf_symbol_type (typename, sym, elfsym)) != -1) ; diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 767d1fc..dd2adcc 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2499,6 +2499,10 @@ tc_i386_fix_adjustable (fixS *fixP ATTRIBUTE_UNUSED) || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 0; + + if (fixP->fx_addsy != NULL + && symbol_get_bfdsym (fixP->fx_addsy)->flags & BSF_GNU_INDIRECT_FUNCTION) + return 0; #endif return 1; } |