diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-08-27 05:58:32 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-08-27 13:16:40 -0700 |
commit | d660d20c0ce197fc195f3f5ac1c908009b520c7e (patch) | |
tree | 62bb49e1ee6054f1aaef8b931066795af1108493 /ld | |
parent | fd8ec8ed8258990700aaf422cea0e12208356014 (diff) | |
download | binutils-d660d20c0ce197fc195f3f5ac1c908009b520c7e.zip binutils-d660d20c0ce197fc195f3f5ac1c908009b520c7e.tar.gz binutils-d660d20c0ce197fc195f3f5ac1c908009b520c7e.tar.bz2 |
x86: Allow R_386_TLS_LE_32 with KMOVD
Since there is no TLS IE transition, allow R_386_TLS_LE_32 with KMOVD.
gas/
PR gas/28595
* config/tc-i386.c (i386_assemble): Remove BFD_RELOC_386_TLS_LE_32
from TLS code check.
* testsuite/gas/i386/inval-tls.s: Remove foo@tpoff(%eax).
* testsuite/gas/i386/inval-tls.l: Updated.
ld/
PR gas/28595
* testsuite/ld-i386/i386.exp: Run tlsle1.
* testsuite/ld-i386/tlsle1.d: New file.
* testsuite/ld-i386/tlsle1.s: Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsle1.d | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsle1.s | 14 |
3 files changed, 31 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index adc88e4..6f97f5d 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -314,6 +314,7 @@ run_dump_test "tlsie2" run_dump_test "tlsie3" run_dump_test "tlsie4" run_dump_test "tlsie5" +run_dump_test "tlsle1" run_dump_test "hidden1" run_dump_test "hidden2" run_dump_test "hidden3" diff --git a/ld/testsuite/ld-i386/tlsle1.d b/ld/testsuite/ld-i386/tlsle1.d new file mode 100644 index 0000000..d304e7b --- /dev/null +++ b/ld/testsuite/ld-i386/tlsle1.d @@ -0,0 +1,16 @@ +#name: TLS LE with kmovd +#as: --32 +#ld: -melf_i386 +#objdump: -dw + +.*: +file format .* + + +Disassembly of section .text: + +0+8049000 <_start>: + +[a-f0-9]+: 65 c4 e1 f9 90 05 04 00 00 00 kmovd %gs:0x4,%k0 + +[a-f0-9]+: c4 e1 f9 90 80 04 00 00 00 kmovd 0x4\(%eax\),%k0 + +[a-f0-9]+: 65 c4 e1 f9 90 05 fc ff ff ff kmovd %gs:0xfffffffc,%k0 + +[a-f0-9]+: c4 e1 f9 90 80 fc ff ff ff kmovd -0x4\(%eax\),%k0 +#pass diff --git a/ld/testsuite/ld-i386/tlsle1.s b/ld/testsuite/ld-i386/tlsle1.s new file mode 100644 index 0000000..283b903 --- /dev/null +++ b/ld/testsuite/ld-i386/tlsle1.s @@ -0,0 +1,14 @@ + .text + .globl _start +_start: + kmovd %gs:foo@tpoff,%k0 + kmovd foo@tpoff(%eax),%k0 + kmovd %gs:foo@ntpoff,%k0 + kmovd foo@ntpoff(%eax),%k0 + .globl foo + .section .tdata,"awT",@progbits + .align 4 + .type foo, @object + .size foo, 4 +foo: + .long 100 |