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 /gold | |
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 'gold')
-rw-r--r-- | gold/testsuite/x86_64_ie_to_le.s | 2 | ||||
-rwxr-xr-x | gold/testsuite/x86_64_ie_to_le.sh | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/gold/testsuite/x86_64_ie_to_le.s b/gold/testsuite/x86_64_ie_to_le.s index bd0643d..56f3dfc 100644 --- a/gold/testsuite/x86_64_ie_to_le.s +++ b/gold/testsuite/x86_64_ie_to_le.s @@ -9,6 +9,8 @@ _start: movq foo@gottpoff(%rip), %r20 addq %r30, foo@gottpoff(%rip), %r8 addq foo@gottpoff(%rip), %rax, %r20 + {nf} addq %r30, foo@gottpoff(%rip), %r8 + {nf} addq foo@gottpoff(%rip), %rax, %r20 .size _start, .-_start .section .tdata,"awT",@progbits .align 4 diff --git a/gold/testsuite/x86_64_ie_to_le.sh b/gold/testsuite/x86_64_ie_to_le.sh index 5308712..2927272 100755 --- a/gold/testsuite/x86_64_ie_to_le.sh +++ b/gold/testsuite/x86_64_ie_to_le.sh @@ -29,3 +29,5 @@ grep -q "add[ \t]\+\$0x[a-f0-9]\+,%r16" x86_64_ie_to_le.stdout grep -q "mov[ \t]\+\$0x[a-f0-9]\+,%r20" x86_64_ie_to_le.stdout grep -q "add[ \t]\+\$0x[a-f0-9]\+,%r30,%r8" x86_64_ie_to_le.stdout grep -q "add[ \t]\+\$0x[a-f0-9]\+,%rax,%r20" x86_64_ie_to_le.stdout +grep -q "\{nf\} add[ \t]\+\$0x[a-f0-9]\+,%r30,%r8" x86_64_ie_to_le.stdout +grep -q "\{nf\} add[ \t]\+\$0x[a-f0-9]\+,%rax,%r20" x86_64_ie_to_le.stdout |