summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-04-24 01:56:02 +0000
committerDavide Italiano <davide@freebsd.org>2016-04-24 01:56:02 +0000
commitae153ec4b436031423db571c917b82eaf3095094 (patch)
treefe26ec5c6392ff20021fc05e51a984ad036ee3a9
parentcefdf238e9ca9df240c2dbc3df3ced3fa9338686 (diff)
downloadbcm5719-llvm-ae153ec4b436031423db571c917b82eaf3095094.tar.gz
bcm5719-llvm-ae153ec4b436031423db571c917b82eaf3095094.zip
[ELF] Use llvm-mc rather than checking in a file.
Now that the support for the 'new' relocations is available. llvm-svn: 267310
-rw-r--r--lld/test/ELF/Inputs/gotpcrelx.obin896 -> 0 bytes
-rw-r--r--lld/test/ELF/gotpcrelx.s15
2 files changed, 11 insertions, 4 deletions
diff --git a/lld/test/ELF/Inputs/gotpcrelx.o b/lld/test/ELF/Inputs/gotpcrelx.o
deleted file mode 100644
index 030065881e8..00000000000
--- a/lld/test/ELF/Inputs/gotpcrelx.o
+++ /dev/null
Binary files differ
diff --git a/lld/test/ELF/gotpcrelx.s b/lld/test/ELF/gotpcrelx.s
index b8e8c890dd6..169a479855d 100644
--- a/lld/test/ELF/gotpcrelx.s
+++ b/lld/test/ELF/gotpcrelx.s
@@ -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 [
OpenPOWER on IntegriCloud