This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
TC_RELOC_RTSYM_LOC_FIXUP
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Fri, 12 Jan 2007 16:53:56 +1030
- Subject: TC_RELOC_RTSYM_LOC_FIXUP
TC_RELOC_RTSYM_LOC_FIXUP disappeared before 2.14, being replaced
with TC_FORCE_RELOCATION_LOCAL. The spu and m32r defines are the
same as the default, so out they go.
* config/tc-spu.h (TC_RELOC_RTSYM_LOC_FIXUP): Delete.
* config/tc-m32r.h (TC_RELOC_RTSYM_LOC_FIXUP): Delete.
* config/tc-mn10300.h (TC_RELOC_RTSYM_LOC_FIXUP): Delete.
(TC_FORCE_RELOCATION): Define.
(TC_FORCE_RELOCATION_LOCAL): Define.
* config/tc-mn10300.c (mn10300_fix_adjustable): Adjust.
Index: gas/config/tc-spu.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-spu.h,v
retrieving revision 1.1
diff -u -p -r1.1 tc-spu.h
--- gas/config/tc-spu.h 25 Oct 2006 06:49:21 -0000 1.1
+++ gas/config/tc-spu.h 12 Jan 2007 05:42:13 -0000
@@ -1,6 +1,6 @@
/* spu.h -- Assembler for spu
- Copyright 2006 Free Software Foundation, Inc.
+ Copyright 2006, 2007 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -54,18 +54,6 @@
/* Values passed to md_apply_fix don't include symbol values. */
#define MD_APPLY_SYM_VALUE(FIX) 0
-/* This expression evaluates to false if the relocation is for a local
- object for which we still want to do the relocation at runtime.
- True if we are willing to perform this relocation while building
- the .o file. This is only used for pcrel relocations. */
-
-#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
- ((FIX)->fx_addsy == NULL \
- || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
- && ! S_IS_WEAK ((FIX)->fx_addsy) \
- && S_IS_DEFINED ((FIX)->fx_addsy) \
- && ! S_IS_COMMON ((FIX)->fx_addsy)))
-
/* The spu uses pseudo-ops with no leading period. */
#define NO_PSEUDO_DOT 1
Index: gas/config/tc-m32r.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m32r.h,v
retrieving revision 1.19
diff -u -p -r1.19 tc-m32r.h
--- gas/config/tc-m32r.h 11 Oct 2005 11:16:16 -0000 1.19
+++ gas/config/tc-m32r.h 12 Jan 2007 05:42:10 -0000
@@ -1,6 +1,6 @@
/* tc-m32r.h -- Header file for tc-m32r.c.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
- Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2007 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -88,13 +88,6 @@ extern bfd_boolean m32r_fix_adjustable (
obj_fix_adjustable() says it is not adjustable. */
#define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP)
-#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
- ((FIX)->fx_addsy == NULL \
- || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
- && ! S_IS_WEAK ((FIX)->fx_addsy) \
- && S_IS_DEFINED ((FIX)->fx_addsy) \
- && ! S_IS_COMMON ((FIX)->fx_addsy)))
-
#define tc_frob_file_before_fix() m32r_frob_file ()
extern void m32r_frob_file (void);
Index: gas/config/tc-mn10300.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mn10300.c,v
retrieving revision 1.58
diff -u -p -r1.58 tc-mn10300.c
--- gas/config/tc-mn10300.c 19 Oct 2006 15:47:33 -0000 1.58
+++ gas/config/tc-mn10300.c 12 Jan 2007 05:42:11 -0000
@@ -1,6 +1,6 @@
/* tc-mn10300.c -- Assembler code for the Matsushita 10300
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006 Free Software Foundation, Inc.
+ 2006, 2007 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -2545,7 +2545,7 @@ bfd_boolean
mn10300_fix_adjustable (fixp)
struct fix *fixp;
{
- if (! TC_RELOC_RTSYM_LOC_FIXUP (fixp))
+ if (TC_FORCE_RELOCATION_LOCAL (fixp))
return 0;
if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
Index: gas/config/tc-mn10300.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mn10300.h,v
retrieving revision 1.19
diff -u -p -r1.19 tc-mn10300.h
--- gas/config/tc-mn10300.h 11 Oct 2005 11:16:16 -0000 1.19
+++ gas/config/tc-mn10300.h 12 Jan 2007 05:42:11 -0000
@@ -1,5 +1,5 @@
/* tc-mn10300.h -- Header file for tc-mn10300.c.
- Copyright 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -26,15 +26,15 @@
#define DIFF_EXPR_OK
#define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
-#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
- ((FIX)->fx_r_type != BFD_RELOC_32_PLT_PCREL \
- && (FIX)->fx_r_type != BFD_RELOC_MN10300_GOT32 \
- && (FIX)->fx_r_type != BFD_RELOC_32_GOT_PCREL \
- && ((FIX)->fx_addsy == NULL \
- || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
- && ! S_IS_WEAK ((FIX)->fx_addsy) \
- && S_IS_DEFINED ((FIX)->fx_addsy) \
- && ! S_IS_COMMON ((FIX)->fx_addsy))))
+#define TC_FORCE_RELOCATION(FIX) \
+ (generic_force_reloc (FIX))
+
+#define TC_FORCE_RELOCATION_LOCAL(FIX) \
+ (!(FIX)->fx_pcrel \
+ || (FIX)->fx_r_type == BFD_RELOC_32_PLT_PCREL \
+ || (FIX)->fx_r_type == BFD_RELOC_MN10300_GOT32 \
+ || (FIX)->fx_r_type == BFD_RELOC_32_GOT_PCREL \
+ || TC_FORCE_RELOCATION (FIX))
#define md_parse_name(name, exprP, mode, nextcharP) \
mn10300_parse_name ((name), (exprP), (mode), (nextcharP))
--
Alan Modra
IBM OzLabs - Linux Technology Centre