aboutsummaryrefslogtreecommitdiff
path: root/bfd/reloc.c
diff options
context:
space:
mode:
authorDenis Chertykov <chertykov@gmail.com>2014-04-10 19:50:33 +0400
committerDenis Chertykov <chertykov@gmail.com>2014-04-10 19:50:33 +0400
commite4ef1b6c3fee295ab41138bf77a82dff16f1d7c3 (patch)
tree4f6ad10afb271882fe8624a082ecb088a1db0feb /bfd/reloc.c
parent9d497a19eabe25b3af1cdd50a957592ed22658e5 (diff)
downloadgdb-e4ef1b6c3fee295ab41138bf77a82dff16f1d7c3.zip
gdb-e4ef1b6c3fee295ab41138bf77a82dff16f1d7c3.tar.gz
gdb-e4ef1b6c3fee295ab41138bf77a82dff16f1d7c3.tar.bz2
bfd/ChangeLog
* elf32-avr.c: Add DIFF relocations for AVR. (avr_final_link_relocate): Handle the DIFF relocs. (bfd_elf_avr_diff_reloc): New. (elf32_avr_is_diff_reloc): New. (elf32_avr_adjust_diff_reloc_value): Reduce difference value. (elf32_avr_relax_delete_bytes): Recompute difference after deleting bytes. * reloc.c: Add BFD_RELOC_AVR_DIFF8/16/32 relocations gas/ChangeLog * config/tc-avr.c: Add new flag mlink-relax. (md_show_usage): Add flag and help text. (md_parse_option): Record whether link relax is turned on. (relaxable_section): New. (avr_validate_fix_sub): New. (avr_force_relocation): New. (md_apply_fix): Generate DIFF reloc. (avr_allow_local_subtract): New. * config/tc-avr.h (TC_LINKRELAX_FIXUP): Define to 0. (TC_FORCE_RELOCATION): Define. (TC_FORCE_RELOCATION_SUB_SAME): Define. (TC_VALIDATE_FIX_SUB): Define. (avr_force_relocation): Declare. (avr_validate_fix_sub): Declare. (md_allow_local_subtract): Define. (avr_allow_local_subtract): Declare. gas/testsuite/ChangeLog * gas/avr/diffreloc_withrelax.d: New testcase. * gas/avr/noreloc_withoutrelax.d: Likewise. * gas/avr/relax.s: Likewise. include/ChangeLog * elf/avr.h: Add new DIFF relocs. ld/testsuite/ChangeLog * ld-avr/norelax_diff.d: New testcase. * ld-avr/relax_diff.d: Likewise. * ld-avr/relax.s: Likewise.
Diffstat (limited to 'bfd/reloc.c')
-rw-r--r--bfd/reloc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 5a7d0e9..7ca3cfd 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -4780,7 +4780,19 @@ ENUM
ENUMDOC
This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
in .byte hlo8(symbol)
-
+ENUM
+ BFD_RELOC_AVR_DIFF8
+ENUMX
+ BFD_RELOC_AVR_DIFF16
+ENUMX
+ BFD_RELOC_AVR_DIFF32
+ENUMDOC
+ AVR relocations to mark the difference of two local symbols.
+ These are only needed to support linker relaxation and can be ignored
+ when not relaxing. The field is set to the value of the difference
+ assuming no relaxation. The relocation encodes the position of the
+ second symbol so the linker can determine whether to adjust the field
+ value.
ENUM
BFD_RELOC_RL78_NEG8
ENUMX