forked from OSchip/llvm-project
[ELF] Use llvm-mc rather than checking in a file.
Now that the support for the 'new' relocations is available. llvm-svn: 267310
This commit is contained in:
parent
cefdf238e9
commit
ae153ec4b4
Binary file not shown.
|
@ -1,12 +1,19 @@
|
|||
// RUN: ld.lld %p/Inputs/gotpcrelx.o -o %t.so -shared
|
||||
// RUN: llvm-mc -filetype=obj -relax-relocations -triple x86_64-pc-linux-gnu \
|
||||
// RUN: %s -o %t.o
|
||||
// RUN: llvm-readobj -r %t.o | FileCheck --check-prefix=RELS %s
|
||||
// RUN: ld.lld %t.o -o %t.so -shared
|
||||
// RUN: llvm-readobj -s -r %t.so | FileCheck %s
|
||||
|
||||
// The gotpcrelx.o is just this file assembled with gas. We should switch to
|
||||
// llvm-mc once it starts producing R_X86_64_GOTPCRELX and
|
||||
// R_X86_64_REX_GOTPCRELX.
|
||||
movq foo@GOTPCREL(%rip), %rax
|
||||
movl bar@GOTPCREL(%rip), %eax
|
||||
|
||||
// RELS: Relocations [
|
||||
// RELS-NEXT: Section ({{.*}}) .rela.text {
|
||||
// RELS-NEXT: 0x3 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
|
||||
// RELS-NEXT: 0x9 R_X86_64_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
|
||||
// RELS-NEXT: }
|
||||
// RELS-NEXT: ]
|
||||
|
||||
// CHECK: Name: .got
|
||||
// CHECK-NEXT: Type: SHT_PROGBITS
|
||||
// CHECK-NEXT: Flags [
|
||||
|
|
Loading…
Reference in New Issue