aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@arm.com>2015-06-23 12:12:06 +0100
committerJiong Wang <jiong.wang@arm.com>2015-06-23 12:12:06 +0100
commitc217058957a45a93481da35e1531ed120750d739 (patch)
tree9e94faaacc0df0173b25dcc96cbefff844ca98dd /ld
parente5ee3fe285c698f1ce3d9bbb596bcda6219f5f3a (diff)
downloadgdb-c217058957a45a93481da35e1531ed120750d739.zip
gdb-c217058957a45a93481da35e1531ed120750d739.tar.gz
gdb-c217058957a45a93481da35e1531ed120750d739.tar.bz2
[AArch64] Generate DT_TEXTREL for relocation against read-only section
2015-06-23 Jiong Wang <jiong.wang@arm.com> bfd/ * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function. (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check relocations against read-only sections. ld/testsuite/ * ld-aarch64/dt_textrel.s: New testcase. * ld-aarch64/dt_textrel.d: New expectation file. * ld-aarch64/aarch64-elf.exp: Run new testcase.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-aarch64/aarch64-elf.exp2
-rw-r--r--ld/testsuite/ld-aarch64/dt_textrel.d7
-rw-r--r--ld/testsuite/ld-aarch64/dt_textrel.s9
4 files changed, 24 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index e81e616..812549c 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-23 Jiong Wang <jiong.wang@arm.com>
+
+ * ld-aarch64/dt_textrel.s: New testcase.
+ * ld-aarch64/dt_textrel.d: New expectation file.
+ * ld-aarch64/aarch64-elf.exp: Run new testcase.
+
2015-06-17 Jiong Wang <jiong.wang@arm.com>
* ld-aarch64/aarch64-elf.exp (aarch64_choose_ilp32_emul): New function.
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index 531ec0e..ac21d14 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -203,6 +203,8 @@ run_dump_test "ifunc-22"
run_dump_test "relasz"
run_dump_test "relocs-257-symbolic-func"
+run_dump_test "dt_textrel"
+
set aarch64elflinktests {
{"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s}
{} "copy-reloc-so.so"}
diff --git a/ld/testsuite/ld-aarch64/dt_textrel.d b/ld/testsuite/ld-aarch64/dt_textrel.d
new file mode 100644
index 0000000..2dbbd2f
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/dt_textrel.d
@@ -0,0 +1,7 @@
+#source: dt_textrel.s
+#ld: -shared
+#readelf: -d
+#...
+.*TEXTREL.*
+.*
+
diff --git a/ld/testsuite/ld-aarch64/dt_textrel.s b/ld/testsuite/ld-aarch64/dt_textrel.s
new file mode 100644
index 0000000..f37f456
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/dt_textrel.s
@@ -0,0 +1,9 @@
+ .cpu generic+fp+simd
+ .global p
+ .comm x,4,4
+ .section .rodata
+ .align 3
+ .type p, %object
+ .size p, 8
+p:
+ .xword x