diff options
author | konglin1 <lingling.kong@intel.com> | 2024-07-01 23:01:12 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-07-01 23:08:31 -0700 |
commit | eb5d719dd774afd445dbf2be891868cf1973058c (patch) | |
tree | ee4e79f92ecd017a275c0570bbdfd8adec976024 /gas | |
parent | aa0c55a9669b7321f5b088ee4833ddad11dfa7b1 (diff) | |
download | gdb-eb5d719dd774afd445dbf2be891868cf1973058c.zip gdb-eb5d719dd774afd445dbf2be891868cf1973058c.tar.gz gdb-eb5d719dd774afd445dbf2be891868cf1973058c.tar.bz2 |
x86-64: Verify that TLS IE works with APX NF
Verify that
{nf} add %reg1, foo@gottpoff(%rip), %reg2
{nf} add foo@gottpoff(%rip), %reg, %reg2
work correctly with ld and gold.
gas/
* testsuite/gas/i386/x86-64-gottpoff.d: Updated.
* testsuite/gas/i386/x86-64-gottpoff.s: Add tests for
"{nf} add %reg1, foo@gottpoff(%rip), %reg2" and
"{nf} add foo@gottpoff(%rip), %reg, %reg2".
gold/
* testsuite/x86_64_ie_to_le.s: Add tests for
"{nf} add %reg1, foo@gottpoff(%rip), %reg2" and
"{nf} add foo@gottpoff(%rip), %reg, %reg2".
* testsuite/x86_64_ie_to_le.sh: Updated.
ld/
* testsuite/ld-x86-64/tlsbindesc.s: Add R_X86_64_CODE_6_GOTTPOFF
for APX NF tests.
* testsuite/ld-x86-64/tlsbindesc.d: Updated.
* testsuite/ld-x86-64/tlsbindesc.rd: Likewise.
Co-Authored-By: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-gottpoff.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-gottpoff.s | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gas/testsuite/gas/i386/x86-64-gottpoff.d b/gas/testsuite/gas/i386/x86-64-gottpoff.d index f2c039a..5d0dd58 100644 --- a/gas/testsuite/gas/i386/x86-64-gottpoff.d +++ b/gas/testsuite/gas/i386/x86-64-gottpoff.d @@ -18,6 +18,10 @@ Disassembly of section .text: +[a-f0-9]+: d5 48 8b 25 00 00 00 00 mov 0x0\(%rip\),%r20 # 3c <_start\+0x3c> 38: R_X86_64_CODE_4_GOTTPOFF foo-0x4 +[a-f0-9]+: 62 74 fc 10 01 05 00 00 00 00 add %r8,0x0\(%rip\),%r16 # 46 <_start\+0x46> 42: R_X86_64_CODE_6_GOTTPOFF foo-0x4 +[a-f0-9]+: 62 f4 9c 18 03 05 00 00 00 00 add 0x0\(%rip\),%rax,%r12 # 50 <_start\+0x50> 4c: R_X86_64_CODE_6_GOTTPOFF foo-0x4 - +[a-f0-9]+: 62 74 fc 10 01 05 00 00 00 00 add %r8,0x0\(%rip\),%r16 # 5a <_start\+0x5a> 56: R_X86_64_CODE_6_GOTTPOFF foo-0x4 - +[a-f0-9]+: 62 f4 9c 18 03 05 00 00 00 00 add 0x0\(%rip\),%rax,%r12 # 64 <_start\+0x64> 60: R_X86_64_CODE_6_GOTTPOFF foo-0x4 + +[a-f0-9]+: 62 74 fc 14 01 05 00 00 00 00 \{nf\} add %r8,0x0\(%rip\),%r16 # 5a <_start\+0x5a> 56: R_X86_64_CODE_6_GOTTPOFF foo-0x4 + +[a-f0-9]+: 62 f4 9c 1c 03 05 00 00 00 00 \{nf\} add 0x0\(%rip\),%rax,%r12 # 64 <_start\+0x64> 60: R_X86_64_CODE_6_GOTTPOFF foo-0x4 + +[a-f0-9]+: 62 74 fc 10 01 05 00 00 00 00 add %r8,0x0\(%rip\),%r16 # 6e <_start\+0x6e> 6a: R_X86_64_CODE_6_GOTTPOFF foo-0x4 + +[a-f0-9]+: 62 f4 9c 18 03 05 00 00 00 00 add 0x0\(%rip\),%rax,%r12 # 78 <_start\+0x78> 74: R_X86_64_CODE_6_GOTTPOFF foo-0x4 + +[a-f0-9]+: 62 74 fc 14 01 05 00 00 00 00 \{nf\} add %r8,0x0\(%rip\),%r16 # 82 <_start\+0x82> 7e: R_X86_64_CODE_6_GOTTPOFF foo-0x4 + +[a-f0-9]+: 62 f4 9c 1c 03 05 00 00 00 00 \{nf\} add 0x0\(%rip\),%rax,%r12 # 8c <_start\+0x8c> 88: R_X86_64_CODE_6_GOTTPOFF foo-0x4 #pass diff --git a/gas/testsuite/gas/i386/x86-64-gottpoff.s b/gas/testsuite/gas/i386/x86-64-gottpoff.s index e39010a..d1f5501 100644 --- a/gas/testsuite/gas/i386/x86-64-gottpoff.s +++ b/gas/testsuite/gas/i386/x86-64-gottpoff.s @@ -18,8 +18,12 @@ _start: addq %r8, foo@GOTTPOFF(%rip), %r16 addq foo@GOTTPOFF(%rip), %rax, %r12 + {nf} addq %r8, foo@GOTTPOFF(%rip), %r16 + {nf} addq foo@GOTTPOFF(%rip), %rax, %r12 .intel_syntax noprefix add r16, QWORD PTR [rip + foo@GOTTPOFF], r8 add r12, rax, QWORD PTR [rip + foo@GOTTPOFF] + {nf} add r16, QWORD PTR [rip + foo@GOTTPOFF], r8 + {nf} add r12, rax, QWORD PTR [rip + foo@GOTTPOFF] |