aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-07-29 06:22:13 +0000
committerAlan Modra <amodra@gmail.com>2009-07-29 06:22:13 +0000
commitaf65af87c018aaceb91afaeefabfec9b0b947096 (patch)
tree379d507f881eb851bcb102bb0ec87663538f8562 /gas
parent9384511500f3bedcefcfd0b7d8e88dc01264a35c (diff)
downloadgdb-af65af87c018aaceb91afaeefabfec9b0b947096.zip
gdb-af65af87c018aaceb91afaeefabfec9b0b947096.tar.gz
gdb-af65af87c018aaceb91afaeefabfec9b0b947096.tar.bz2
PR ld/10269
* symbols.c (S_FORCE_RELOC): True for BSF_GNU_INDIRECT_FUNCTION. * config/tc-i386.c: Revert 2009-06-13 change. * config/tc-i386.h: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-i386.c6
-rw-r--r--gas/config/tc-i386.h6
-rw-r--r--gas/symbols.c3
4 files changed, 10 insertions, 12 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 30be5a5..3f45e7d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-29 Alan Modra <amodra@bigpond.net.au>
+
+ PR ld/10269
+ * symbols.c (S_FORCE_RELOC): True for BSF_GNU_INDIRECT_FUNCTION.
+ * config/tc-i386.c: Revert 2009-06-13 change.
+ * config/tc-i386.h: Likewise.
+
2009-07-28 Jan Beulich <jbeulich@novell.com>
* expr.c (op_rank): Specify size. Remove O_md* initializers.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index c90cadc..4109dd9 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2566,10 +2566,6 @@ 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;
}
@@ -7368,7 +7364,7 @@ md_apply_fix (fixP, valP, seg)
if ((sym_seg == seg
|| (symbol_section_p (fixP->fx_addsy)
&& sym_seg != absolute_section))
- && !TC_FORCE_RELOCATION (fixP))
+ && !generic_force_reloc (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 1666563..b51a9f4 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -143,12 +143,6 @@ 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
diff --git a/gas/symbols.c b/gas/symbols.c
index 761cebf..c72946b 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -1,6 +1,6 @@
/* symbols.c -symbol table-
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -2053,6 +2053,7 @@ S_FORCE_RELOC (symbolS *s, int strict)
return ((strict
&& ((s->bsym->flags & BSF_WEAK) != 0
+ || (s->bsym->flags & BSF_GNU_INDIRECT_FUNCTION) != 0
|| (EXTERN_FORCE_RELOC
&& (s->bsym->flags & BSF_GLOBAL) != 0)))
|| s->bsym->section == undefined_section