aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-10-08 02:38:26 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-10-08 02:38:26 +0000
commitb9ed7c0818f1ed119d4a6c1913d911e751747e50 (patch)
treeb9c45fa9b2d897dc058225ee536263be8a8909c4 /ld/testsuite
parent09a1697895209319062464df385f4c710734dd39 (diff)
downloadgdb-b9ed7c0818f1ed119d4a6c1913d911e751747e50.zip
gdb-b9ed7c0818f1ed119d4a6c1913d911e751747e50.tar.gz
gdb-b9ed7c0818f1ed119d4a6c1913d911e751747e50.tar.bz2
2009-10-07 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10744 * ld-scripts/phdrs3.exp: Run phdrs3a. * ld-scripts/phdrs3a.d: New. * ld-scripts/phdrs3a.t: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog8
-rw-r--r--ld/testsuite/ld-scripts/phdrs3.exp1
-rw-r--r--ld/testsuite/ld-scripts/phdrs3a.d9
-rw-r--r--ld/testsuite/ld-scripts/phdrs3a.t15
4 files changed, 33 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 774301e..43f5d1b 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2009-10-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/10744
+ * ld-scripts/phdrs3.exp: Run phdrs3a.
+
+ * ld-scripts/phdrs3a.d: New.
+ * ld-scripts/phdrs3a.t: Likewise.
+
2009-10-08 Alan Modra <amodra@bigpond.net.au>
PR ld/10744
diff --git a/ld/testsuite/ld-scripts/phdrs3.exp b/ld/testsuite/ld-scripts/phdrs3.exp
index 90651af..e7e0414 100644
--- a/ld/testsuite/ld-scripts/phdrs3.exp
+++ b/ld/testsuite/ld-scripts/phdrs3.exp
@@ -34,5 +34,6 @@ if { [istarget spu*-*-*] } {
}
run_dump_test "phdrs3"
+run_dump_test "phdrs3a"
set LDFLAGS $old_ldflags
diff --git a/ld/testsuite/ld-scripts/phdrs3a.d b/ld/testsuite/ld-scripts/phdrs3a.d
new file mode 100644
index 0000000..80bde71
--- /dev/null
+++ b/ld/testsuite/ld-scripts/phdrs3a.d
@@ -0,0 +1,9 @@
+#name: PHDRS headers 3a
+#source: phdrs.s
+#ld: -T phdrs3a.t
+#readelf: -l --wide
+
+#...
+[ \t]+LOAD[ x0-9a-f]+ R [ x0-9a-f]+
+[ \t]+LOAD[ x0-9a-f]+ E [ x0-9a-f]+
+#pass
diff --git a/ld/testsuite/ld-scripts/phdrs3a.t b/ld/testsuite/ld-scripts/phdrs3a.t
new file mode 100644
index 0000000..c07ff34
--- /dev/null
+++ b/ld/testsuite/ld-scripts/phdrs3a.t
@@ -0,0 +1,15 @@
+PHDRS
+{
+ data PT_LOAD FILEHDR PHDRS FLAGS(4);
+ text PT_LOAD FILEHDR PHDRS FLAGS(1);
+}
+
+SECTIONS
+{
+ /* This test will fail on architectures where the startaddress below
+ is less than the constant MAXPAGESIZE. */
+ . = 0x800000 + SIZEOF_HEADERS;
+ .text : { *(.text) } :text
+ .data : { *(.data) } :data
+ /DISCARD/ : { *(.*) }
+}