aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-06-14 01:39:46 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-06-14 01:39:46 +0000
commitc25bc9fc0d99cdc97211346362b677428747eabd (patch)
treef046e10a8fe03df0645dde4411601f3395df9aea /gas/config
parent46ebc6b5903b50c862e924b5885b7120b25487f9 (diff)
downloadgdb-c25bc9fc0d99cdc97211346362b677428747eabd.zip
gdb-c25bc9fc0d99cdc97211346362b677428747eabd.tar.gz
gdb-c25bc9fc0d99cdc97211346362b677428747eabd.tar.bz2
bfd/
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 loc_hash_memory. (elf_i386_local_hash): New. (elf_i386_local_htab_hash): Likewise. (elf_i386_local_htab_eq): Likewise. (elf_i386_get_local_sym_hash): Likewise. (elf_i386_link_hash_table_free): Likewise. (elf_i386_allocate_local_dynrelocs): Likewise. (elf_i386_finish_local_dynamic_symbol): Likewise. (bfd_elf64_bfd_link_hash_table_free): Likewise. (elf_i386_link_hash_table_create): Create loc_hash_table and loc_hash_memory. (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_finish_dynamic_sections): Likewise. (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym isn't NULL. * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h". (elf64_x86_64_link_hash_table): Add loc_hash_table and loc_hash_memory. (elf64_x86_64_local_hash): New. (elf64_x86_64_local_htab_hash): Likewise. (elf64_x86_64_local_htab_eq): Likewise. (elf64_x86_64_get_local_sym_hash): Likewise. (elf64_x86_64_link_hash_table_free): Likewise. (elf64_x86_64_allocate_local_dynrelocs): Likewise. (elf64_x86_64_finish_local_dynamic_symbol): Likewise. (bfd_elf64_bfd_link_hash_table_free): Likewise. (elf64_x86_64_link_hash_table_create): Create loc_hash_table and loc_hash_memory. (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC symbols. (elf64_x86_64_size_dynamic_sections): Likewise. (elf64_x86_64_relocate_section): Likewise. (elf64_x86_64_finish_dynamic_sections): Likewise. (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if sym isn't NULL. gas/ 2009-06-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/10269 * config/tc-i386.c (md_apply_fix): Use TC_FORCE_RELOCATION instead of generic_force_reloc. * config/tc-i386.h (TC_FORCE_RELOCATION): New. ld/testsuite/ 2009-06-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/10269 *: ld-ifunc/ifunc-1-local-x86.d: New. *: ld-ifunc/ifunc-1-local-x86.s: Likewise. *: ld-ifunc/ifunc-2-local-i386.d: Likewise. *: ld-ifunc/ifunc-2-local-i386.s: Likewise. *: ld-ifunc/ifunc-2-local-x86-64.d: Likewise. *: ld-ifunc/ifunc-2-local-x86-64.s: Likewise. *: ld-ifunc/ifunc-4-local-x86.d: Likewise. *: ld-ifunc/ifunc-4-local-x86.s: Likewise. *: ld-ifunc/ifunc-5-local-i386.s: Likewise. *: ld-ifunc/ifunc-5-local-x86-64.s: Likewise. *: ld-ifunc/ifunc-5a-local-i386.d: Likewise. *: ld-ifunc/ifunc-5a-local-x86-64.d: Likewise. *: ld-ifunc/ifunc-5b-local-i386.d: Likewise. *: ld-ifunc/ifunc-5b-local-x86-64.d: Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c2
-rw-r--r--gas/config/tc-i386.h6
2 files changed, 7 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index faa638f..b0293d8 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -7235,7 +7235,7 @@ md_apply_fix (fixP, valP, seg)
if ((sym_seg == seg
|| (symbol_section_p (fixP->fx_addsy)
&& sym_seg != absolute_section))
- && !generic_force_reloc (fixP))
+ && !TC_FORCE_RELOCATION (fixP))
{
/* Yes, we add the values in twice. This is because
bfd_install_relocation subtracts them out again. I think
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index bb4821a..b4809f7 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -138,6 +138,12 @@ extern int tc_i386_fix_adjustable (struct fix *);
(OUTPUT_FLAVOR == bfd_target_elf_flavour)
#endif
+/* BSF_GNU_INDIRECT_FUNCTION symbols always need relocatoon. */
+#define TC_FORCE_RELOCATION(FIX) \
+ ((symbol_get_bfdsym ((FIX)->fx_addsy)->flags \
+ & BSF_GNU_INDIRECT_FUNCTION) \
+ || generic_force_reloc (FIX))
+
/* This expression evaluates to true if the relocation is for a local
object for which we still want to do the relocation at runtime.
False if we are willing to perform this relocation while building