aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-06-12 12:55:11 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-06-12 12:55:11 +0000
commit8981c88a1e028446400c393b82fc415481cc07c3 (patch)
tree10163bc54bc36feb19f6c226119c02af03020baa /ld/testsuite
parent3832a4d892b209ca17c5320a506c5902da63e025 (diff)
downloadgdb-8981c88a1e028446400c393b82fc415481cc07c3.zip
gdb-8981c88a1e028446400c393b82fc415481cc07c3.tar.gz
gdb-8981c88a1e028446400c393b82fc415481cc07c3.tar.bz2
Abort if PT_GNU_RELRO segment doesn't fit in PT_LOAD segment
bfd/ PR bfd/14207 * elf.c (assign_file_positions_for_non_load_sections): Abort if PT_GNU_RELRO segment doesn't fit in PT_LOAD segment. ld/testsuite/ PR ld/14207 * ld-x86-64/x86-64.exp: Run pr14207. * ld-x86-64/pr14207.d: New file. * ld-x86-64/pr14207.s: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog8
-rw-r--r--ld/testsuite/ld-x86-64/pr14207.d9
-rw-r--r--ld/testsuite/ld-x86-64/pr14207.s24
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp1
4 files changed, 42 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index ba73f8c..17583d4 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2012-06-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/14207
+ * ld-x86-64/x86-64.exp: Run pr14207.
+
+ * ld-x86-64/pr14207.d: New file.
+ * ld-x86-64/pr14207.s: Likewise.
+
2012-06-11 H.J. Lu <hongjiu.lu@intel.com>
PR ld/14215
diff --git a/ld/testsuite/ld-x86-64/pr14207.d b/ld/testsuite/ld-x86-64/pr14207.d
new file mode 100644
index 0000000..2362e88
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr14207.d
@@ -0,0 +1,9 @@
+#name: PR ld/14207
+#as: --64
+#ld: -melf_x86_64 -shared -z relro -z now
+#readelf: -l --wide
+
+#failif
+#...
+ NULL +.*
+#...
diff --git a/ld/testsuite/ld-x86-64/pr14207.s b/ld/testsuite/ld-x86-64/pr14207.s
new file mode 100644
index 0000000..496e67e
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr14207.s
@@ -0,0 +1,24 @@
+
+ .section .ctors, "aw"
+ .space 0x10, 1
+
+ .section .dtors, "aw"
+ .space 0x10, 2
+
+ .section .jcr, "aw"
+ .space 0x8, 3
+
+ .section .data.rel.ro
+ .p2align 4
+ .space 0x20, 3
+
+ .section .dynamic
+ .space 0xb0, 2
+
+ .section .got
+ .space 0x2a8, 4
+
+ .bss
+ .zero 0x840
+
+
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index b9af8de..1eb1b1c 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -209,6 +209,7 @@ run_dump_test "pr13947"
run_dump_test "pr12570a"
run_dump_test "pr12570b"
run_dump_test "pr14215"
+run_dump_test "pr14207"
if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
return