aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@arm.com>2015-08-11 17:05:34 +0100
committerJiong Wang <jiong.wang@arm.com>2015-08-11 21:25:04 +0100
commitf69e49203b49b7353748b78a9d8111440d9ac291 (patch)
treea0ddcb90ce91df6e0c5ff852d00d4a3d86909d55 /ld
parent1107e076cff62e1093da024ab73e5648051781ab (diff)
downloadgdb-f69e49203b49b7353748b78a9d8111440d9ac291.zip
gdb-f69e49203b49b7353748b78a9d8111440d9ac291.tar.gz
gdb-f69e49203b49b7353748b78a9d8111440d9ac291.tar.bz2
[AArch64][3/8] LD support BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21
2015-08-11 Jiong Wang <jiong.wang@arm.com> bfd/ * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. (aarch64_reloc_got_type): Likewise. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. ld/testsuite/ * ld-aarch64/tls-small-ld.s: New file. * ld-aarch64/tls-small-ld.d: Likewise. * ld-aarch64/aarch64-elf.exp: Run new test.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-aarch64/aarch64-elf.exp1
-rw-r--r--ld/testsuite/ld-aarch64/tls-small-ld.d9
-rw-r--r--ld/testsuite/ld-aarch64/tls-small-ld.s7
4 files changed, 23 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index f719db7..99e87f7 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2015-08-11 Jiong Wang <jiong.wang@arm.com>
+
+ * ld-aarch64/tls-small-ld.s: New file.
+ * ld-aarch64/tls-small-ld.d: Likewise.
+ * ld-aarch64/aarch64-elf.exp: Run new test.
+
2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
PR ld/18808
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index ab2fa49..0c06610 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -147,6 +147,7 @@ run_dump_test "tls-tiny-desc-ie"
run_dump_test "tls-tiny-desc-le"
run_dump_test "tls-tiny-ie"
run_dump_test "tls-tiny-ld"
+run_dump_test "tls-small-ld"
run_dump_test "tlsle"
run_dump_test "tlsle-symbol-offset"
run_dump_test "gc-got-relocs"
diff --git a/ld/testsuite/ld-aarch64/tls-small-ld.d b/ld/testsuite/ld-aarch64/tls-small-ld.d
new file mode 100644
index 0000000..74cf256
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-small-ld.d
@@ -0,0 +1,9 @@
+#source: tls-small-ld.s
+#ld: -T relocs.ld -shared
+#readelf: -Wr
+
+Relocation section '\.rela\.dyn' at offset 0x10070 contains 2 entries:
+ Offset Info Type Symbol's Value Symbol's Name \+ Addend
+0000000000000000 0000000000000000 R_AARCH64_NONE 0
+0000000000020008 0000000200000404 R_AARCH64_TLS_DTPMOD64 0000000000000000 dummy \+ 0
+
diff --git a/ld/testsuite/ld-aarch64/tls-small-ld.s b/ld/testsuite/ld-aarch64/tls-small-ld.s
new file mode 100644
index 0000000..0a8b6b9
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/tls-small-ld.s
@@ -0,0 +1,7 @@
+// Test file for AArch64 LD -- reloc 518
+
+ .text
+func:
+ add x1, x2, x3
+ // BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21
+ adrp x0, :tlsldm:dummy