aboutsummaryrefslogtreecommitdiff
path: root/bfd/reloc.c
diff options
context:
space:
mode:
authorKuan-Lin Chen <kuanlinchentw@gmail.com>2014-09-11 14:25:05 +0800
committerKuan-Lin Chen <kuanlinchentw@gmail.com>2014-09-16 13:08:00 +0800
commit1c8f6a4d1fcca9e56ac705a224778bf690122a07 (patch)
tree7ff41099c5a2f8b433f654b509a7c259899124e4 /bfd/reloc.c
parent40c7a7cb74ee4a9ec0830d734198fcd0e99c3a37 (diff)
downloadgdb-1c8f6a4d1fcca9e56ac705a224778bf690122a07.zip
gdb-1c8f6a4d1fcca9e56ac705a224778bf690122a07.tar.gz
gdb-1c8f6a4d1fcca9e56ac705a224778bf690122a07.tar.bz2
NDS32: Code refactoring of relaxation.
Refactor each relaxation pattern to raise the maintainability. In origin, all patterns is analysed in nds32_elf_relax_section, so it is hard to debug and maintain. Therefore, we classify all patterns into different functions in this patch. Moreover, we adjust all optimizations into nds32_elf_relax_section to take these optimizations in turn. This can promise all relaxation being done after calling gld${EMULATION_NAME}_after_allocation.
Diffstat (limited to 'bfd/reloc.c')
-rw-r--r--bfd/reloc.c52
1 files changed, 50 insertions, 2 deletions
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 79079cf..dc47173 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -4000,6 +4000,20 @@ ENUMX
BFD_RELOC_NDS32_17_FIXED
ENUMX
BFD_RELOC_NDS32_25_FIXED
+ENUMX
+ BFD_RELOC_NDS32_LONGCALL4
+ENUMX
+ BFD_RELOC_NDS32_LONGCALL5
+ENUMX
+ BFD_RELOC_NDS32_LONGCALL6
+ENUMX
+ BFD_RELOC_NDS32_LONGJUMP4
+ENUMX
+ BFD_RELOC_NDS32_LONGJUMP5
+ENUMX
+ BFD_RELOC_NDS32_LONGJUMP6
+ENUMX
+ BFD_RELOC_NDS32_LONGJUMP7
ENUMDOC
for relax
ENUM
@@ -4102,8 +4116,14 @@ ENUMX
ENUMX
BFD_RELOC_NDS32_DIFF_ULEB128
ENUMX
+ BFD_RELOC_NDS32_EMPTY
+ENUMDOC
+ relaxation relative relocation types
+ENUM
BFD_RELOC_NDS32_25_ABS
-ENUMX
+ENUMDOC
+ This is a 25 bit absolute address.
+ENUM
BFD_RELOC_NDS32_DATA
ENUMX
BFD_RELOC_NDS32_TRAN
@@ -4112,7 +4132,35 @@ ENUMX
ENUMX
BFD_RELOC_NDS32_10IFCU_PCREL
ENUMDOC
- relaxation relative relocation types
+ For ex9 and ifc using.
+ENUM
+ BFD_RELOC_NDS32_TPOFF
+ENUMX
+ BFD_RELOC_NDS32_TLS_LE_HI20
+ENUMX
+ BFD_RELOC_NDS32_TLS_LE_LO12
+ENUMX
+ BFD_RELOC_NDS32_TLS_LE_ADD
+ENUMX
+ BFD_RELOC_NDS32_TLS_LE_LS
+ENUMX
+ BFD_RELOC_NDS32_GOTTPOFF
+ENUMX
+ BFD_RELOC_NDS32_TLS_IE_HI20
+ENUMX
+ BFD_RELOC_NDS32_TLS_IE_LO12S2
+ENUMX
+ BFD_RELOC_NDS32_TLS_TPOFF
+ENUMX
+ BFD_RELOC_NDS32_TLS_LE_20
+ENUMX
+ BFD_RELOC_NDS32_TLS_LE_15S0
+ENUMX
+ BFD_RELOC_NDS32_TLS_LE_15S1
+ENUMX
+ BFD_RELOC_NDS32_TLS_LE_15S2
+ENUMDOC
+ For TLS.
ENUM