diff options
author | Alan Modra <amodra@gmail.com> | 2008-09-19 10:00:40 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-09-19 10:00:40 +0000 |
commit | 5db484ff3d77b5241c7cbef02788962fa6aeedd8 (patch) | |
tree | 5c557d1a5d8ca291d9d076e7cec357e574741d52 /gas/config/tc-sh.h | |
parent | e79f59555a009cc9b5ef8233debb948c795a9cca (diff) | |
download | binutils-gdb-5db484ff3d77b5241c7cbef02788962fa6aeedd8.tar.gz |
* write.c (TC_FORCE_RELOCATION_SUB_LOCAL): Heed md_register_arithmetic.
(TC_VALIDATE_FIX_SUB): Likewise.
* config/tc-frv.h (TC_FORCE_RELOCATION_SUB_LOCAL): Likewise.
* config/tc-hppa.h (TC_FORCE_RELOCATION_SUB_LOCAL): Likewise.
* config/tc-mn10300.h (TC_VALIDATE_FIX_SUB): Likewise.
* config/tc-sh.h (TC_VALIDATE_FIX_SUB): Likewise.
(TC_FORCE_RELOCATION_SUB_LOCAL): Likewise.
* config/tc-sh64.h (TC_VALIDATE_FIX_SUB): Likewise.
* config/tc-xtensa.h (TC_VALIDATE_FIX_SUB): Likewise.
* doc/internals.texi (TC_FORCE_RELOCATION_SUB_ABS,
TC_FORCE_RELOCATION_SUB_LOCAL, TC_VALIDATE_FIX_SUB): Show new param.
Diffstat (limited to 'gas/config/tc-sh.h')
-rw-r--r-- | gas/config/tc-sh.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gas/config/tc-sh.h b/gas/config/tc-sh.h index a3187b3d0a4..51b656197f6 100644 --- a/gas/config/tc-sh.h +++ b/gas/config/tc-sh.h @@ -83,8 +83,9 @@ extern int sh_force_relocation (struct fix *); || (sh_relax && SWITCH_TABLE (FIX))) /* Don't complain when we leave fx_subsy around. */ -#define TC_VALIDATE_FIX_SUB(FIX) \ - (sh_relax && SWITCH_TABLE (FIX)) +#define TC_VALIDATE_FIX_SUB(FIX, SEG) \ + ((md_register_arithmetic || (SEG) != reg_section) \ + && sh_relax && SWITCH_TABLE (FIX)) #define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC) extern long md_pcrel_from_section (struct fix *, segT); @@ -207,7 +208,9 @@ extern bfd_boolean sh_fix_adjustable (struct fix *); || (FIX)->fx_r_type == BFD_RELOC_SH_GOTPC \ || TC_FORCE_RELOCATION (FIX)) -#define TC_FORCE_RELOCATION_SUB_LOCAL(FIX) (sh_relax && SWITCH_TABLE (FIX)) +#define TC_FORCE_RELOCATION_SUB_LOCAL(FIX, SEG) \ + ((!md_register_arithmetic && (SEG) == reg_section) \ + || (sh_relax && SWITCH_TABLE (FIX))) /* This keeps the subtracted symbol around, for use by PLT_PCREL relocs. */ @@ -217,9 +220,10 @@ extern bfd_boolean sh_fix_adjustable (struct fix *); /* Don't complain when we leave fx_subsy around. */ #undef TC_VALIDATE_FIX_SUB -#define TC_VALIDATE_FIX_SUB(FIX) \ - ((FIX)->fx_r_type == BFD_RELOC_32_PLT_PCREL \ - || (sh_relax && SWITCH_TABLE (FIX))) +#define TC_VALIDATE_FIX_SUB(FIX, SEG) \ + ((md_register_arithmetic || (SEG) != reg_section) \ + && ((FIX)->fx_r_type == BFD_RELOC_32_PLT_PCREL \ + || (sh_relax && SWITCH_TABLE (FIX)))) #define md_parse_name(name, exprP, mode, nextcharP) \ sh_parse_name ((name), (exprP), (mode), (nextcharP)) |