From 66a4ad426416db84eb567c211dd73c8722380b06 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 12 Jan 2007 06:23:52 +0000 Subject: * 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. --- gas/config/tc-m32r.h | 11 ++--------- gas/config/tc-mn10300.c | 4 ++-- gas/config/tc-mn10300.h | 20 ++++++++++---------- gas/config/tc-spu.h | 14 +------------- 4 files changed, 15 insertions(+), 34 deletions(-) (limited to 'gas') diff --git a/gas/config/tc-m32r.h b/gas/config/tc-m32r.h index 69fe945..e5373cc 100644 --- a/gas/config/tc-m32r.h +++ b/gas/config/tc-m32r.h @@ -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 (struct fix *); 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); diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c index 41358f3..fb7dc58 100644 --- a/gas/config/tc-mn10300.c +++ b/gas/config/tc-mn10300.c @@ -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 diff --git a/gas/config/tc-mn10300.h b/gas/config/tc-mn10300.h index dff663d..8f5c813 100644 --- a/gas/config/tc-mn10300.h +++ b/gas/config/tc-mn10300.h @@ -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)) diff --git a/gas/config/tc-spu.h b/gas/config/tc-spu.h index 6f36617..fadf456 100644 --- a/gas/config/tc-spu.h +++ b/gas/config/tc-spu.h @@ -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 -- cgit v1.1