diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-04-08 16:14:49 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-04-08 16:14:49 +0000 |
commit | 959b0961c9c714aa735ebb59e925fdf6f5117d99 (patch) | |
tree | a4ee34555eb80fd9b8a2b650389f7a219bd8a001 /ld/testsuite/ld-i386 | |
parent | 0e9dfb462638da8467eaa6f3981234f828463387 (diff) | |
download | gdb-959b0961c9c714aa735ebb59e925fdf6f5117d99.zip gdb-959b0961c9c714aa735ebb59e925fdf6f5117d99.tar.gz gdb-959b0961c9c714aa735ebb59e925fdf6f5117d99.tar.bz2 |
Properly handle R_386_TLS_LDO_32 for PIE.
bfd/
2011-04-08 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12654
* elf32-i386.c (elf_i386_relocate_section): Check !executable
instead of shared for R_386_TLS_LDO_32.
ld/testsuite/
2011-04-08 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12654
* ld-i386/i386.exp: Run tlspie2.
* ld-i386/tlspie2.d: New.
* ld-i386/tlspie2.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-i386')
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlspie2.d | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlspie2.s | 12 |
3 files changed, 26 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index ead0df1..cc82e15 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -190,6 +190,7 @@ run_dump_test "protected1" run_dump_test "protected2" run_dump_test "protected3" run_dump_test "tlspie1" +run_dump_test "tlspie2" run_dump_test "nogot1" run_dump_test "nogot2" run_dump_test "discarded1" diff --git a/ld/testsuite/ld-i386/tlspie2.d b/ld/testsuite/ld-i386/tlspie2.d new file mode 100644 index 0000000..16d6ae4 --- /dev/null +++ b/ld/testsuite/ld-i386/tlspie2.d @@ -0,0 +1,13 @@ +#name: TLS with PIE +#as: --32 +#ld: -melf_i386 -pie +#objdump: -dw + +.*: +file format .* + + +Disassembly of section .text: + +0+188 <_start>: +[ ]*[a-f0-9]+: 8d 05 fc ff ff ff lea 0xfffffffc,%eax +#pass diff --git a/ld/testsuite/ld-i386/tlspie2.s b/ld/testsuite/ld-i386/tlspie2.s new file mode 100644 index 0000000..a586430 --- /dev/null +++ b/ld/testsuite/ld-i386/tlspie2.s @@ -0,0 +1,12 @@ + .section .tbss,"awT",@nobits + .align 4 + .type a, @object + .size a, 4 +a: + .zero 4 + .text +.globl _start + .type _start, @function +_start: + leal a@dtpoff, %eax + .size _start, .-_start |