Skip to content

Commit 5aa29af

Browse files
committed
[MC][NFC] Update tests for GOTTPOFF relocation.
Update tests for GOTTPOFF relocation as LEA instruction is not supported by linkers for GOTTPOFF relocation. Only MOV and ADD instructions are supported.
1 parent cc11310 commit 5aa29af

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

llvm/test/MC/ELF/relocation.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bar:
1818
movl bar, %edx # R_X86_64_32S
1919
movq bar, %rdx # R_X86_64_32S
2020
.long bar # R_X86_64_32
21-
leaq foo@GOTTPOFF(%rip), %rax # R_X86_64_GOTTPOFF
21+
movq foo@GOTTPOFF(%rip), %rax # R_X86_64_GOTTPOFF
2222
movq foo@GOTTPOFF(%rip), %r31 # R_X86_64_CODE_4_GOTTPOFF
2323
addq foo@GOTTPOFF(%rip), %r31 # R_X86_64_CODE_4_GOTTPOFF
2424
# NDD

llvm/test/MC/ELF/tls.s

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
// Test that all symbols are of type STT_TLS.
44

5-
leaq foo1@TLSGD(%rip), %rdi
6-
leaq foo2@GOTTPOFF(%rip), %rdi
7-
leaq foo3@TLSLD(%rip), %rdi
8-
.long foo4@GOTTPOFF
9-
.long foo5@TLSLD
10-
.long foo6@TLSGD
11-
.section .zed,"awT",@progbits
5+
leaq foo1@TLSGD(%rip), %rdi
6+
movq foo2@GOTTPOFF(%rip), %rdi
7+
leaq foo3@TLSLD(%rip), %rdi
8+
9+
.long foo4@GOTTPOFF
10+
.long foo5@TLSLD
11+
.long foo6@TLSGD
12+
.section .zed,"awT",@progbits
1213
foobar:
13-
.long 43
14+
.long 43
1415

1516
// CHECK: Symbol {
1617
// CHECK: Name: foobar

0 commit comments

Comments
 (0)