From 91cb9803fcf6d1c7001395d80f79120ae8e6338a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 16 May 2017 08:43:24 +0930 Subject: Allow target files access to default TC_FORCE_RELOCATION defines * write.c (GENERIC_FORCE_RELOCATION_LOCAL): Define. (TC_FORCE_RELOCATION_LOCAL): Use it. (GENERIC_FORCE_RELOCATION_SUB_SAME): Define. (TC_FORCE_RELOCATION_SUB_SAME): Use it. * config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL, TC_FORCE_RELOCATION_SUB_SAME): Use GENERIC defines. * config/tc-aarch64.h: Similarly. * config/tc-avr.h: Similarly. * config/tc-cris.h: Similarly. * config/tc-i386.h: Similarly. * config/tc-i960.h: Similarly. * config/tc-ia64.h: Similarly. * config/tc-microblaze.h: Similarly. * config/tc-mips.h: Similarly. * config/tc-msp430.h: Similarly. * config/tc-nds32.h: Similarly. * config/tc-pru.h: Similarly. * config/tc-riscv.h: Similarly. * config/tc-rl78.h: Similarly. * config/tc-s390.h: Similarly. * config/tc-sh.h: Similarly. * config/tc-sh64.h: Similarly. * config/tc-sparc.h: Similarly. * config/tc-xtensa.h: Similarly. * config/tc-mn10300.h: Similarly. (GENERIC_FORCE_RELOCATION_LOCAL): Define. * config/tc-msp430.c (msp430_force_relocation_local): Modify to be addition to rather than replacement of standard TC_FORCE_RELOCATION_LOCAL. --- gas/config/tc-arm.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gas/config/tc-arm.h') diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h index ebcf27b..53c4986 100644 --- a/gas/config/tc-arm.h +++ b/gas/config/tc-arm.h @@ -200,17 +200,17 @@ void arm_copy_symbol_attributes (symbolS *, symbolS *); pcrel, but it is easier to be safe than sorry. */ #define TC_FORCE_RELOCATION_LOCAL(FIX) \ - (!(FIX)->fx_pcrel \ + (GENERIC_FORCE_RELOCATION_LOCAL (FIX) \ || (FIX)->fx_r_type == BFD_RELOC_ARM_GOT32 \ || (FIX)->fx_r_type == BFD_RELOC_32 \ - || ((FIX)->fx_addsy != NULL && S_IS_WEAK ((FIX)->fx_addsy)) \ - || TC_FORCE_RELOCATION (FIX)) + || ((FIX)->fx_addsy != NULL \ + && S_IS_WEAK ((FIX)->fx_addsy))) /* Force output of R_ARM_REL32 relocations against thumb function symbols. This is needed to ensure the low bit is handled correctly. */ #define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEG) \ - (THUMB_IS_FUNC ((FIX)->fx_addsy) \ - || !SEG_NORMAL (SEG)) + (GENERIC_FORCE_RELOCATION_SUB_SAME (FIX, SEG) \ + || THUMB_IS_FUNC ((FIX)->fx_addsy)) #define TC_FORCE_RELOCATION_ABS(FIX) \ (((FIX)->fx_pcrel \ -- cgit v1.1