summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-06-24 14:03:15 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-06-24 14:03:15 +0000
commitb660339a4972d5f5110f62554af26705ff374427 (patch)
tree56a42e24bfdb89e459a3f3c8cd03883f30c52c08 /ld/testsuite/ld-x86-64
parent537537478d0582da41169023d4dfd1d7e02e5ae7 (diff)
downloadbinutils-redhat-b660339a4972d5f5110f62554af26705ff374427.tar.gz
Add testcases for PR ld/12921.
2011-06-24 H.J. Lu <hongjiu.lu@intel.com> PR ld/12921 * ld-i386/i386.exp: Run pr12921. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/pr12921.d: New. * ld-i386/pr12921.s: Likewise. * ld-x86-64/pr12921.d: Likewise. * ld-x86-64/pr12921.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64')
-rw-r--r--ld/testsuite/ld-x86-64/pr12921.d21
-rw-r--r--ld/testsuite/ld-x86-64/pr12921.s25
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp1
3 files changed, 47 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/pr12921.d b/ld/testsuite/ld-x86-64/pr12921.d
new file mode 100644
index 0000000000..c0fe8abb2c
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr12921.d
@@ -0,0 +1,21 @@
+#name: PR ld/12921
+#as: --64
+#ld: -melf_x86_64
+#readelf: -S --wide
+
+There are 7 section headers, starting at offset 0x2058:
+
+Section Headers:
+ \[Nr\] Name Type Address Off Size ES Flg Lk Inf Al
+ \[ 0\] NULL 0000000000000000 000000 000000 00 0 0 0
+ \[ 1\] .text PROGBITS 0000000000401000 001000 000001 00 AX 0 0 4096
+ \[ 2\] .data PROGBITS 0000000000602000 002000 000028 00 WA 0 0 4096
+ \[ 3\] .bss NOBITS 0000000000603000 002028 010000 00 WA 0 0 4096
+ \[ 4\] .shstrtab STRTAB 0000000000000000 002028 00002c 00 0 0 1
+ \[ 5\] .symtab SYMTAB 0000000000000000 002218 000120 18 6 6 8
+ \[ 6\] .strtab STRTAB 0000000000000000 002338 000037 00 0 0 1
+Key to Flags:
+ W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\), l \(large\)
+ 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-x86-64/pr12921.s b/ld/testsuite/ld-x86-64/pr12921.s
new file mode 100644
index 0000000000..9c4966fd99
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr12921.s
@@ -0,0 +1,25 @@
+ .text
+ .balign 4096
+vtext:
+ .p2align 4,,15
+ .globl _start
+ .type _start, @function
+_start:
+ ret
+ .size _start, .-_start
+ .globl vdata
+ .data
+ .align 4096
+ .type vdata, @object
+ .size vdata, 4
+vdata:
+ .long 5
+ .comm vbss,65536,4096
+ .align 16
+ .type local, @object
+ .size local, 24
+local:
+ .byte 77
+ .zero 7
+ .dc.a local
+ .dc.a 0
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 58e4bc014e..bf75d00a66 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -161,6 +161,7 @@ run_dump_test "nogot1"
run_dump_test "nogot2"
run_dump_test "discarded1"
run_dump_test "pr12718"
+run_dump_test "pr12921"
if { ![istarget "x86_64-*-linux*"] } {
return