aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-i386.c2
-rw-r--r--gas/config/tc-i386.h6
3 files changed, 15 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 4aa9d03..5ddad8d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
2009-06-11 Anthony Green <green@moxielogic.com>
* config/tc-moxie.c (md_chars_to_number): Define.
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