summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorwalt <walt>2012-08-28 02:43:16 +0000
committerwalt <walt>2012-08-28 02:43:16 +0000
commit7cb88549940b0779bc564a9af6117c7d0fe8cdc3 (patch)
tree3216692c2bd11a17244e59743ee2407e00f07217 /include
parentd4023ffb3f873e59d4b32513e6a785124f4f4810 (diff)
downloadgdb-7cb88549940b0779bc564a9af6117c7d0fe8cdc3.tar.gz
Add support for constructing pc-relative addresses to the plt, by
adding the necessary assembly operators and relocations. bfd: * reloc.c (Add BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): new relocations. * elfxx-tilegx.c (tilegx_elf_howto_table): Handle new relocations. (tilegx_reloc_map): Ditto. (reloc_to_create_func): Ditto. (tilegx_elf_check_relocs): Ditto. (tilegx_elf_gc_sweep_hook): Ditto. (tilegx_elf_relocate_section): Ditto. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. gas: * tc-tilegx.c (O_hw0_plt): Define operator. (O_hw1_plt): Ditto. (O_hw1_last_plt): Ditto. (O_hw2_last_plt): Ditto. (md_begin): Handle new operators. (emit_tilegx_instruction): Ditto. (md_apply_fix): Ditto. * doc/c-tilegx.texi: Document new operators. include/elf: * tilegx.h (R_TILEGX_IMM16_X0_HW0_PLT_PCREL): New relocation. (R_TILEGX_IMM16_X1_HW0_PLT_PCREL): Ditto. (R_TILEGX_IMM16_X0_HW1_PLT_PCREL): Ditto. (R_TILEGX_IMM16_X1_HW1_PLT_PCREL): Ditto. (R_TILEGX_IMM16_X0_HW2_PLT_PCREL): Ditto. (R_TILEGX_IMM16_X1_HW2_PLT_PCREL): Ditto. (R_TILEGX_IMM16_X0_HW3_PLT_PCREL): Ditto. (R_TILEGX_IMM16_X1_HW3_PLT_PCREL): Ditto. (R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL): Ditto. (R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL): Ditto. (R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL): Ditto. (R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL): Ditto. (R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL ): Ditto. (R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): Ditto.
Diffstat (limited to 'include')
-rw-r--r--include/elf/ChangeLog17
-rw-r--r--include/elf/tilegx.h20
2 files changed, 34 insertions, 3 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 362dc452b5b..ece126a62fd 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,20 @@
+2012-08-27 Walter Lee <walt@tilera.com>
+
+ * tilegx.h (R_TILEGX_IMM16_X0_HW0_PLT_PCREL): New relocation.
+ (R_TILEGX_IMM16_X1_HW0_PLT_PCREL): Ditto.
+ (R_TILEGX_IMM16_X0_HW1_PLT_PCREL): Ditto.
+ (R_TILEGX_IMM16_X1_HW1_PLT_PCREL): Ditto.
+ (R_TILEGX_IMM16_X0_HW2_PLT_PCREL): Ditto.
+ (R_TILEGX_IMM16_X1_HW2_PLT_PCREL): Ditto.
+ (R_TILEGX_IMM16_X0_HW3_PLT_PCREL): Ditto.
+ (R_TILEGX_IMM16_X1_HW3_PLT_PCREL): Ditto.
+ (R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL): Ditto.
+ (R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL): Ditto.
+ (R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL): Ditto.
+ (R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL): Ditto.
+ (R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL ): Ditto.
+ (R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): Ditto.
+
2012-08-13 Ian Bolton <ian.bolton@arm.com>
Laurent Desnogues <laurent.desnogues@arm.com>
Jim MacArthur <jim.macarthur@arm.com>
diff --git a/include/elf/tilegx.h b/include/elf/tilegx.h
index 004ce28caa7..e838b8097da 100644
--- a/include/elf/tilegx.h
+++ b/include/elf/tilegx.h
@@ -104,13 +104,21 @@ START_RELOC_NUMBERS (elf_tilegx_reloc_type)
RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_GOT, 64)
RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_GOT, 65)
- /* Relocs 66-71 are currently not defined. */
+
+ RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_PLT_PCREL, 66)
+ RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_PLT_PCREL, 67)
+ RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_PLT_PCREL, 68)
+ RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_PLT_PCREL, 69)
+ RELOC_NUMBER (R_TILEGX_IMM16_X0_HW2_PLT_PCREL, 70)
+ RELOC_NUMBER (R_TILEGX_IMM16_X1_HW2_PLT_PCREL, 71)
RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST_GOT, 72)
RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST_GOT, 73)
RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_LAST_GOT, 74)
RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_LAST_GOT, 75)
- /* Relocs 76-77 are currently not defined. */
+
+ RELOC_NUMBER (R_TILEGX_IMM16_X0_HW3_PLT_PCREL, 76)
+ RELOC_NUMBER (R_TILEGX_IMM16_X1_HW3_PLT_PCREL, 77)
RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_TLS_GD, 78)
RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_TLS_GD, 79)
@@ -128,7 +136,13 @@ START_RELOC_NUMBERS (elf_tilegx_reloc_type)
RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_TLS_IE, 92)
RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_TLS_IE, 93)
- /* Relocs 94-99 are currently not defined. */
+
+ RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL, 94)
+ RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL, 95)
+ RELOC_NUMBER (R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL, 96)
+ RELOC_NUMBER (R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL, 97)
+ RELOC_NUMBER (R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL, 98)
+ RELOC_NUMBER (R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL, 99)
RELOC_NUMBER (R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE, 100)
RELOC_NUMBER (R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE, 101)