* config/tc-spu.h (TC_RELOC_RTSYM_LOC_FIXUP): Delete.
authorAlan Modra <amodra@gmail.com>
Fri, 12 Jan 2007 06:23:52 +0000 (06:23 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 12 Jan 2007 06:23:52 +0000 (06:23 +0000)
* 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.

gas/config/tc-m32r.h
gas/config/tc-mn10300.c
gas/config/tc-mn10300.h
gas/config/tc-spu.h

index 69fe9453cc36b640a9faf468f0068016b52b5763..e5373cc160faeb09561c65a1e7c165dc6f237375 100644 (file)
@@ -1,6 +1,6 @@
 /* tc-m32r.h -- Header file for tc-m32r.c.
 /* 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.
 
 
    This file is part of GAS, the GNU Assembler.
 
@@ -88,13 +88,6 @@ extern bfd_boolean m32r_fix_adjustable (struct fix *);
    obj_fix_adjustable() says it is not adjustable.  */
 #define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP)
 
    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);
 
 #define tc_frob_file_before_fix() m32r_frob_file ()
 extern void m32r_frob_file (void);
 
index 41358f35e54f838ddb6ca4bfeae0c1f3c3110d26..fb7dc58aeccf3f46e9c58556c22f7a84fe924c61 100644 (file)
@@ -1,6 +1,6 @@
 /* tc-mn10300.c -- Assembler code for the Matsushita 10300
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 /* 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.
 
 
    This file is part of GAS, the GNU Assembler.
 
@@ -2545,7 +2545,7 @@ bfd_boolean
 mn10300_fix_adjustable (fixp)
      struct fix *fixp;
 {
 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
     return 0;
 
   if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
index dff663d29adf6ba6d591b996614018e295fcef63..8f5c81356de605722ca360b43790cea52890b548 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-mn10300.h -- Header file for tc-mn10300.c.
 /* 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.
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 #define DIFF_EXPR_OK
 #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
 
 #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))
 
 #define md_parse_name(name, exprP, mode, nextcharP) \
     mn10300_parse_name ((name), (exprP), (mode), (nextcharP))
index 6f3661746c310be281b6456407d69f98e538cc7b..fadf4561bae4f8a21bd0001a5cb87f17f6cc205d 100644 (file)
@@ -1,6 +1,6 @@
 /* spu.h -- Assembler for spu
 
 /* 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.
 
 
    This file is part of GAS, the GNU Assembler.
 
 /* Values passed to md_apply_fix don't include symbol values.  */
 #define MD_APPLY_SYM_VALUE(FIX) 0
 
 /* 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
 
 /* The spu uses pseudo-ops with no leading period.  */
 #define NO_PSEUDO_DOT 1