aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/elf/ChangeLog4
-rw-r--r--include/elf/nds32.h31
2 files changed, 28 insertions, 7 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index ab0a542..dd9bd9b 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,7 @@
+2014-09-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
+
+ * nds32.h: Declare new relocations.
+
2014-09-15 Andrew Bennett <andrew.bennett@imgtec.com>
Matthew Fortune <matthew.fortune@imgtec.com>
diff --git a/include/elf/nds32.h b/include/elf/nds32.h
index 216bbc1..71aa4aa 100644
--- a/include/elf/nds32.h
+++ b/include/elf/nds32.h
@@ -76,7 +76,6 @@ START_RELOC_NUMBERS (elf_nds32_reloc_type)
RELOC_NUMBER (R_NDS32_GOTOFF, 43)
RELOC_NUMBER (R_NDS32_GOTPC20, 44)
RELOC_NUMBER (R_NDS32_GOT_HI20, 45)
-
RELOC_NUMBER (R_NDS32_GOT_LO12, 46)
RELOC_NUMBER (R_NDS32_GOTPC_HI20, 47)
RELOC_NUMBER (R_NDS32_GOTPC_LO12, 48)
@@ -95,8 +94,8 @@ START_RELOC_NUMBERS (elf_nds32_reloc_type)
RELOC_NUMBER (R_NDS32_15_FIXED_RELA, 61)
RELOC_NUMBER (R_NDS32_17_FIXED_RELA, 62)
RELOC_NUMBER (R_NDS32_25_FIXED_RELA, 63)
- RELOC_NUMBER (R_NDS32_PLTREL_HI20, 64)
- RELOC_NUMBER (R_NDS32_PLTREL_LO12, 65)
+ RELOC_NUMBER (R_NDS32_PLTREL_HI20, 64) /* This is obsoleted. */
+ RELOC_NUMBER (R_NDS32_PLTREL_LO12, 65) /* This is obsoleted. */
RELOC_NUMBER (R_NDS32_PLT_GOTREL_HI20, 66)
RELOC_NUMBER (R_NDS32_PLT_GOTREL_LO12, 67)
RELOC_NUMBER (R_NDS32_SDA12S2_DP_RELA, 68)
@@ -123,22 +122,38 @@ START_RELOC_NUMBERS (elf_nds32_reloc_type)
RELOC_NUMBER (R_NDS32_GOT15S2_RELA, 89)
RELOC_NUMBER (R_NDS32_GOT17S2_RELA, 90)
RELOC_NUMBER (R_NDS32_5_RELA, 91)
- RELOC_NUMBER (R_NDS32_10_UPCREL_RELA, 92)
+ RELOC_NUMBER (R_NDS32_10_UPCREL_RELA, 92) /* This is obsoleted. */
RELOC_NUMBER (R_NDS32_SDA_FP7U2_RELA, 93)
RELOC_NUMBER (R_NDS32_WORD_9_PCREL_RELA, 94)
RELOC_NUMBER (R_NDS32_25_ABS_RELA, 95)
RELOC_NUMBER (R_NDS32_17IFC_PCREL_RELA, 96)
RELOC_NUMBER (R_NDS32_10IFCU_PCREL_RELA, 97)
+ RELOC_NUMBER (R_NDS32_TLS_LE_HI20, 98)
+ RELOC_NUMBER (R_NDS32_TLS_LE_LO12, 99)
+ RELOC_NUMBER (R_NDS32_TLS_IE_HI20, 100)
+ RELOC_NUMBER (R_NDS32_TLS_IE_LO12S2, 101)
+ RELOC_NUMBER (R_NDS32_TLS_TPOFF, 102)
+ RELOC_NUMBER (R_NDS32_TLS_LE_20, 103)
+ RELOC_NUMBER (R_NDS32_TLS_LE_15S0, 104)
+ RELOC_NUMBER (R_NDS32_TLS_LE_15S1, 105)
+ RELOC_NUMBER (R_NDS32_TLS_LE_15S2, 106)
+ RELOC_NUMBER (R_NDS32_LONGCALL4, 107)
+ RELOC_NUMBER (R_NDS32_LONGCALL5, 108)
+ RELOC_NUMBER (R_NDS32_LONGCALL6, 109)
+ RELOC_NUMBER (R_NDS32_LONGJUMP4, 110)
+ RELOC_NUMBER (R_NDS32_LONGJUMP5, 111)
+ RELOC_NUMBER (R_NDS32_LONGJUMP6, 112)
+ RELOC_NUMBER (R_NDS32_LONGJUMP7, 113)
RELOC_NUMBER (R_NDS32_RELAX_ENTRY, 192)
RELOC_NUMBER (R_NDS32_GOT_SUFF, 193)
RELOC_NUMBER (R_NDS32_GOTOFF_SUFF, 194)
RELOC_NUMBER (R_NDS32_PLT_GOT_SUFF, 195)
- RELOC_NUMBER (R_NDS32_MULCALL_SUFF, 196)
+ RELOC_NUMBER (R_NDS32_MULCALL_SUFF, 196) /* This is obsoleted. */
RELOC_NUMBER (R_NDS32_PTR, 197)
RELOC_NUMBER (R_NDS32_PTR_COUNT, 198)
RELOC_NUMBER (R_NDS32_PTR_RESOLVED, 199)
- RELOC_NUMBER (R_NDS32_PLTBLOCK, 200)
+ RELOC_NUMBER (R_NDS32_PLTBLOCK, 200) /* This is obsoleted. */
RELOC_NUMBER (R_NDS32_RELAX_REGION_BEGIN, 201)
RELOC_NUMBER (R_NDS32_RELAX_REGION_END, 202)
RELOC_NUMBER (R_NDS32_MINUEND, 203)
@@ -149,7 +164,9 @@ START_RELOC_NUMBERS (elf_nds32_reloc_type)
RELOC_NUMBER (R_NDS32_DIFF_ULEB128, 208)
RELOC_NUMBER (R_NDS32_DATA, 209)
RELOC_NUMBER (R_NDS32_TRAN, 210)
- RELOC_NUMBER (R_NDS32_FPBASE, 211)
+ RELOC_NUMBER (R_NDS32_TLS_LE_ADD, 211)
+ RELOC_NUMBER (R_NDS32_TLS_LE_LS, 212)
+ RELOC_NUMBER (R_NDS32_EMPTY, 213)
END_RELOC_NUMBERS (R_NDS32_max)