diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-06-24 14:03:15 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-06-24 14:03:15 +0000 |
commit | a81aeffc8121b05dbf414029e94cf48a777ecfe4 (patch) | |
tree | 090898c1eb6737bb7bc2a6d754bca547f0c76ce7 /ld | |
parent | 1e951488fd8ea41b7527541a600e912b01546ab3 (diff) | |
download | fsf-binutils-gdb-a81aeffc8121b05dbf414029e94cf48a777ecfe4.zip fsf-binutils-gdb-a81aeffc8121b05dbf414029e94cf48a777ecfe4.tar.gz fsf-binutils-gdb-a81aeffc8121b05dbf414029e94cf48a777ecfe4.tar.bz2 |
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')
-rw-r--r-- | ld/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr12921.d | 21 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr12921.s | 25 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr12921.d | 21 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr12921.s | 25 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/x86-64.exp | 1 |
7 files changed, 105 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 75c0c09..4817ef2 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,14 @@ +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. + 2011-06-22 Thomas Schwinge <thomas@schwinge.name> * ld-elf/elf.exp: Execute array_tests_pie tests on *-*-gnu*, too. diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index ae798c0..68b71fb 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -200,6 +200,7 @@ run_dump_test "nogot1" run_dump_test "nogot2" run_dump_test "discarded1" run_dump_test "pr12718" +run_dump_test "pr12921" if { !([istarget "i?86-*-linux*"] || [istarget "i?86-*-gnu*"] diff --git a/ld/testsuite/ld-i386/pr12921.d b/ld/testsuite/ld-i386/pr12921.d new file mode 100644 index 0000000..4b75888 --- /dev/null +++ b/ld/testsuite/ld-i386/pr12921.d @@ -0,0 +1,21 @@ +#name: PR ld/12921 +#as: --32 +#ld: -melf_i386 +#readelf: -S --wide + +There are 7 section headers, starting at offset 0x204c: + +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 08049000 001000 000001 00 AX 0 0 4096 + \[ 2\] .data PROGBITS 0804b000 002000 000020 00 WA 0 0 4096 + \[ 3\] .bss NOBITS 0804c000 002020 010000 00 WA 0 0 4096 + \[ 4\] .shstrtab STRTAB 00000000 002020 00002c 00 0 0 1 + \[ 5\] .symtab SYMTAB 00000000 002164 0000c0 10 6 6 4 + \[ 6\] .strtab STRTAB 00000000 002224 000037 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/pr12921.s b/ld/testsuite/ld-i386/pr12921.s new file mode 100644 index 0000000..9c4966f --- /dev/null +++ b/ld/testsuite/ld-i386/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/pr12921.d b/ld/testsuite/ld-x86-64/pr12921.d new file mode 100644 index 0000000..c0fe8ab --- /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 0000000..9c4966f --- /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 58e4bc0..bf75d00 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 |