aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-rl78.h
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2015-12-08 01:29:25 -0500
committerDJ Delorie <dj@redhat.com>2015-12-08 01:29:25 -0500
commite896287c1643b8b47080c4a8ddbe9a92d9fa585b (patch)
treecbab9e88d6c15d508f6498f7050089895fa9e5e3 /gas/config/tc-rl78.h
parent7859afc4fa05f6876c4e6b95cfb8fc252efd96bc (diff)
downloadgdb-e896287c1643b8b47080c4a8ddbe9a92d9fa585b.zip
gdb-e896287c1643b8b47080c4a8ddbe9a92d9fa585b.tar.gz
gdb-e896287c1643b8b47080c4a8ddbe9a92d9fa585b.tar.bz2
rl78: relaxation fixes
Various fixes to linker relaxation. In general, we need to support relaxing every branch, even if we don't relax it in the assembler, so we can optionally defer relaxation to the linker. * elf32-rl78.c (rl78_offset_for_reloc): Add more relocs. (rl78_elf_relax_section): Add bc/bz/bnc/bnz/bh/bnh. Fix reloc choices. * config/rl78-parse.y: Make all branches relaxable via rl78_linkrelax_branch(). * config/tc-rl78.c (rl78_linkrelax_branch): Mark all relaxable branches with relocs. (options): Add OPTION_NORELAX. (md_longopts): Add -mnorelax. (md_parse_option): Support OPTION_NORELAX. (op_type_T): Add bh, sk, call, and br. (rl78_opcode_type): Likewise. (rl78_relax_frag): Fix not-relaxing logic. Add sk. (md_convert_frag): Fix relocation handling. (tc_gen_reloc): Strip relax relocs when not linker relaxing. (md_apply_fix): Defer overflow handling for anything that needs a PLT, to the linker. * config/tc-rl78.h (TC_FORCE_RELOCATION): Force all relocations to the linker when linker relaxing. * doc/c-rl78.texi (norelax): Add.
Diffstat (limited to 'gas/config/tc-rl78.h')
-rw-r--r--gas/config/tc-rl78.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gas/config/tc-rl78.h b/gas/config/tc-rl78.h
index b9ede61..82f798e 100644
--- a/gas/config/tc-rl78.h
+++ b/gas/config/tc-rl78.h
@@ -99,3 +99,5 @@ extern void rl78_elf_final_processing (void);
|| TC_FORCE_RELOCATION (FIX))
#define DWARF2_USE_FIXED_ADVANCE_PC 1
+
+#define TC_FORCE_RELOCATION(FIX) (linkrelax)