aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-msp430.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-05-16 08:43:24 +0930
committerAlan Modra <amodra@gmail.com>2017-05-16 10:35:02 +0930
commit91cb9803fcf6d1c7001395d80f79120ae8e6338a (patch)
tree76ce1a1640c62ee9b78e692e1e41b8a1abd67ccf /gas/config/tc-msp430.h
parentbc4e12ded1d4c8d589d82b2a10ade6b47f219db3 (diff)
downloadgdb-91cb9803fcf6d1c7001395d80f79120ae8e6338a.zip
gdb-91cb9803fcf6d1c7001395d80f79120ae8e6338a.tar.gz
gdb-91cb9803fcf6d1c7001395d80f79120ae8e6338a.tar.bz2
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.
Diffstat (limited to 'gas/config/tc-msp430.h')
-rw-r--r--gas/config/tc-msp430.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/gas/config/tc-msp430.h b/gas/config/tc-msp430.h
index 6789a1e..c996544 100644
--- a/gas/config/tc-msp430.h
+++ b/gas/config/tc-msp430.h
@@ -116,8 +116,9 @@ extern long md_pcrel_from_section (struct fix *, segT);
msp430_relax_frag (SEG, FRAGP, STRETCH)
extern long msp430_relax_frag (segT, fragS *, long);
-#define TC_FORCE_RELOCATION_LOCAL(FIX) \
- msp430_force_relocation_local (FIX)
+#define TC_FORCE_RELOCATION_LOCAL(FIX) \
+ (GENERIC_FORCE_RELOCATION_LOCAL (FIX) \
+ || msp430_force_relocation_local (FIX))
extern int msp430_force_relocation_local (struct fix *);
/* We need to add reference symbols for .data/.bss. */
@@ -159,9 +160,9 @@ extern bfd_boolean msp430_allow_local_subtract (expressionS *, expressionS *, se
linker, but this fix is simpler, and it pretty much only affects
object size a little bit. */
#define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEC) \
- ( ((SEC)->flags & SEC_CODE) != 0 \
+ (GENERIC_FORCE_RELOCATION_SUB_SAME (FIX, SEC) \
+ || ((SEC)->flags & SEC_CODE) != 0 \
|| ((SEC)->flags & SEC_DEBUGGING) != 0 \
- || ! SEG_NORMAL (SEC) \
|| TC_FORCE_RELOCATION (FIX))
/* We validate subtract arguments within tc_gen_reloc(),