aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-06-27 16:35:58 +0100
committerNick Clifton <nickc@redhat.com>2016-06-27 16:35:58 +0100
commit42b7a39bf6eb2e90fb1b07c2d53d7a93263508d2 (patch)
treef0a9def52397f3cb301100dc7770dc8da5e61b55 /ld/testsuite
parent95daf21060008545515e94aeba501082e8710cc0 (diff)
downloadgdb-42b7a39bf6eb2e90fb1b07c2d53d7a93263508d2.zip
gdb-42b7a39bf6eb2e90fb1b07c2d53d7a93263508d2.tar.gz
gdb-42b7a39bf6eb2e90fb1b07c2d53d7a93263508d2.tar.bz2
Allow a second -T<section>=<addr> to override a previous version on the same linker command line.
PR ld/20302 * lexsup.c (set_segment_start): If resetting the start address of a section, remember to generate a new script element as well. * testsuite/ld-scripts/pr20302.d: New test. * testsuite/ld-scripts/scripts.exp: Run the new test.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ld-scripts/pr20302.d12
-rw-r--r--ld/testsuite/ld-scripts/script.exp1
2 files changed, 13 insertions, 0 deletions
diff --git a/ld/testsuite/ld-scripts/pr20302.d b/ld/testsuite/ld-scripts/pr20302.d
new file mode 100644
index 0000000..ec655dd
--- /dev/null
+++ b/ld/testsuite/ld-scripts/pr20302.d
@@ -0,0 +1,12 @@
+#ld: -Tdata=0x1000 -Tdata=0x2000 -Tcross2.t
+#source: align2a.s
+#objdump: -h
+#notarget: rx-*-* *-*-aout *-*-netbsd x86_64-*-cygwin *-*-vms
+# RX uses non standard section names.
+# AOUT and NETBSD have fixed address for the data section.
+# x86_64 Cygwin biases all start addresses to be > 2Gb.
+# VMS targets need extra libraries.
+
+#...
+ . \.data[ ]+0+[0-9a-f]+[ ]+0+02000[ ]+0+02000.*
+#pass
diff --git a/ld/testsuite/ld-scripts/script.exp b/ld/testsuite/ld-scripts/script.exp
index b178cb3..1b19202 100644
--- a/ld/testsuite/ld-scripts/script.exp
+++ b/ld/testsuite/ld-scripts/script.exp
@@ -230,3 +230,4 @@ foreach test_script $test_script_list {
}
run_dump_test "align-with-input"
+run_dump_test "pr20302"