aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-i386
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-05-01 13:38:22 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-05-01 13:38:22 +0000
commit2abca860afc7679ab7bcfaaef40a90bef6e8a07f (patch)
tree0f4868dbc6e7e1af1d8cfd3591ccb1b1cccf4961 /ld/testsuite/ld-i386
parent9d4057ee3bda54d4df12f2a2a795e8c6b3dc45b4 (diff)
downloadgdb-2abca860afc7679ab7bcfaaef40a90bef6e8a07f.zip
gdb-2abca860afc7679ab7bcfaaef40a90bef6e8a07f.tar.gz
gdb-2abca860afc7679ab7bcfaaef40a90bef6e8a07f.tar.bz2
Add testcases for PR ld/12718.
2011-05-01 H.J. Lu <hongjiu.lu@intel.com> PR ld/12718 * ld-i386/i386.exp: Run pr12718. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/pr12718.d: New. * ld-i386/pr12718.s: Likewise. * ld-x86-64/pr12718.d: Likewise. * ld-x86-64/pr12718.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-i386')
-rw-r--r--ld/testsuite/ld-i386/i386.exp1
-rw-r--r--ld/testsuite/ld-i386/pr12718.d19
-rw-r--r--ld/testsuite/ld-i386/pr12718.s4
3 files changed, 24 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index cc82e15..3bce2d3 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -194,6 +194,7 @@ run_dump_test "tlspie2"
run_dump_test "nogot1"
run_dump_test "nogot2"
run_dump_test "discarded1"
+run_dump_test "pr12718"
if { !([istarget "i?86-*-linux*"]
|| [istarget "i?86-*-gnu*"]
diff --git a/ld/testsuite/ld-i386/pr12718.d b/ld/testsuite/ld-i386/pr12718.d
new file mode 100644
index 0000000..57eea4e
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr12718.d
@@ -0,0 +1,19 @@
+#name: PR ld/12718
+#as: --32
+#ld: -melf_i386
+#readelf: -S
+
+There are 5 section headers, starting at offset 0x7c:
+
+Section Headers:
+ \[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al
+ \[ 0\] NULL 00000000 000000 000000 00 0 0 0
+ \[ 1\] .text PROGBITS 08048054 000054 000006 00 AX 0 0 4
+ \[ 2\] .shstrtab STRTAB 00000000 00005a 000021 00 0 0 1
+ \[ 3\] .symtab SYMTAB 00000000 000144 000070 10 4 2 4
+ \[ 4\] .strtab STRTAB 00000000 0001b4 000024 00 0 0 1
+Key to Flags:
+ W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\)
+ I \(info\), L \(link order\), G \(group\), T \(TLS\), E \(exclude\), x \(unknown\)
+ O \(extra OS processing required\) o \(OS specific\), p \(processor specific\)
+#pass
diff --git a/ld/testsuite/ld-i386/pr12718.s b/ld/testsuite/ld-i386/pr12718.s
new file mode 100644
index 0000000..162704e
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr12718.s
@@ -0,0 +1,4 @@
+.globl foo
+foo: ret
+.globl _start
+_start: call foo