[lld] r267310 - [ELF] Use llvm-mc rather than checking in a file.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 23 18:56:02 PDT 2016
Author: davide
Date: Sat Apr 23 20:56:02 2016
New Revision: 267310
URL: http://llvm.org/viewvc/llvm-project?rev=267310&view=rev
Log:
[ELF] Use llvm-mc rather than checking in a file.
Now that the support for the 'new' relocations is available.
Removed:
lld/trunk/test/ELF/Inputs/gotpcrelx.o
Modified:
lld/trunk/test/ELF/gotpcrelx.s
Removed: lld/trunk/test/ELF/Inputs/gotpcrelx.o
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/gotpcrelx.o?rev=267309&view=auto
==============================================================================
Binary files lld/trunk/test/ELF/Inputs/gotpcrelx.o (original) and lld/trunk/test/ELF/Inputs/gotpcrelx.o (removed) differ
Modified: lld/trunk/test/ELF/gotpcrelx.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/gotpcrelx.s?rev=267310&r1=267309&r2=267310&view=diff
==============================================================================
--- lld/trunk/test/ELF/gotpcrelx.s (original)
+++ lld/trunk/test/ELF/gotpcrelx.s Sat Apr 23 20:56:02 2016
@@ -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 at GOTPCREL(%rip), %rax
movl bar at 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 [
More information about the llvm-commits
mailing list