[lld] r366532 - [ELF][AArch64] Improve some aarch64-*.s tests
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 23:33:37 PDT 2019
Author: maskray
Date: Thu Jul 18 23:33:36 2019
New Revision: 366532
URL: http://llvm.org/viewvc/llvm-project?rev=366532&view=rev
Log:
[ELF][AArch64] Improve some aarch64-*.s tests
* Delete aarch64-tls-static.s: it is covered by aarch64-tlsdesc.c
* Add --no-show-raw-insn to llvm-objdump -d tests
* When linking an executable with %t.so, the path %t.so will be recorded in the DT_NEEDED entry if %t.so doesn't have DT_SONAME. The DT_NEEDED has varying lengths on different systems.
Add -soname to make tests more robust. This issue will become outstanding if we allow overlapping PT_LOAD (D64930).
Removed:
lld/trunk/test/ELF/aarch64-tls-static.s
Modified:
lld/trunk/test/ELF/aarch64-condb-reloc.s
lld/trunk/test/ELF/aarch64-copy.s
lld/trunk/test/ELF/aarch64-gnu-ifunc-plt.s
lld/trunk/test/ELF/aarch64-gnu-ifunc2.s
lld/trunk/test/ELF/aarch64-jump26-thunk.s
lld/trunk/test/ELF/aarch64-nopic-plt.s
lld/trunk/test/ELF/aarch64-tls-gdie.s
lld/trunk/test/ELF/aarch64-tls-gdle.s
lld/trunk/test/ELF/aarch64-tls-ie.s
lld/trunk/test/ELF/aarch64-tlsdesc.s
lld/trunk/test/ELF/aarch64-tstbr14-reloc.s
lld/trunk/test/ELF/aarch64-undefined-weak.s
Modified: lld/trunk/test/ELF/aarch64-condb-reloc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-condb-reloc.s?rev=366532&r1=366531&r2=366532&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-condb-reloc.s (original)
+++ lld/trunk/test/ELF/aarch64-condb-reloc.s Thu Jul 18 23:33:36 2019
@@ -1,10 +1,10 @@
# REQUIRES: aarch64
-# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %p/Inputs/aarch64-condb-reloc.s -o %t1
-# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %t2
-# RUN: ld.lld %t1 %t2 -o %t
-# RUN: llvm-objdump -d %t | FileCheck %s
-# RUN: ld.lld -shared %t1 %t2 -o %t3
-# RUN: llvm-objdump -d %t3 | FileCheck -check-prefix=DSO %s
+# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %p/Inputs/aarch64-condb-reloc.s -o %t1.o
+# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %t2.o
+# RUN: ld.lld %t1.o %t2.o -o %t
+# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
+# RUN: ld.lld -shared %t1.o %t2.o -o %t.so
+# RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck -check-prefix=DSO %s
# RUN: llvm-readobj -S -r %t3 | FileCheck -check-prefix=DSOREL %s
# 0x11024 - 36 = 0x11000
@@ -13,21 +13,21 @@
# CHECK: Disassembly of section .text:
# CHECK-EMPTY:
# CHECK-NEXT: _foo:
-# CHECK-NEXT: 210000: {{.*}} nop
-# CHECK-NEXT: 210004: {{.*}} nop
-# CHECK-NEXT: 210008: {{.*}} nop
-# CHECK-NEXT: 21000c: {{.*}} nop
+# CHECK-NEXT: 210000: nop
+# CHECK-NEXT: 210004: nop
+# CHECK-NEXT: 210008: nop
+# CHECK-NEXT: 21000c: nop
# CHECK: _bar:
-# CHECK-NEXT: 210010: {{.*}} nop
-# CHECK-NEXT: 210014: {{.*}} nop
-# CHECK-NEXT: 210018: {{.*}} nop
+# CHECK-NEXT: 210010: nop
+# CHECK-NEXT: 210014: nop
+# CHECK-NEXT: 210018: nop
# CHECK: _dah:
-# CHECK-NEXT: 21001c: {{.*}} nop
-# CHECK-NEXT: 210020: {{.*}} nop
+# CHECK-NEXT: 21001c: nop
+# CHECK-NEXT: 210020: nop
# CHECK: _start:
-# CHECK-NEXT: 210024: {{.*}} b.eq #-36
-# CHECK-NEXT: 210028: {{.*}} b.eq #-24
-# CHECK-NEXT: 21002c: {{.*}} b.eq #-16
+# CHECK-NEXT: 210024: b.eq #-36 <_foo>
+# CHECK-NEXT: 210028: b.eq #-24 <_bar>
+# CHECK-NEXT: 21002c: b.eq #-16 <_dah>
#DSOREL: Section {
#DSOREL: Index:
@@ -56,51 +56,51 @@
#DSO: Disassembly of section .text:
#DSO-EMPTY:
#DSO-NEXT: _foo:
-#DSO-NEXT: 10000: {{.*}} nop
-#DSO-NEXT: 10004: {{.*}} nop
-#DSO-NEXT: 10008: {{.*}} nop
-#DSO-NEXT: 1000c: {{.*}} nop
+#DSO-NEXT: 10000: nop
+#DSO-NEXT: 10004: nop
+#DSO-NEXT: 10008: nop
+#DSO-NEXT: 1000c: nop
#DSO: _bar:
-#DSO-NEXT: 10010: {{.*}} nop
-#DSO-NEXT: 10014: {{.*}} nop
-#DSO-NEXT: 10018: {{.*}} nop
+#DSO-NEXT: 10010: nop
+#DSO-NEXT: 10014: nop
+#DSO-NEXT: 10018: nop
#DSO: _dah:
-#DSO-NEXT: 1001c: {{.*}} nop
-#DSO-NEXT: 10020: {{.*}} nop
+#DSO-NEXT: 1001c: nop
+#DSO-NEXT: 10020: nop
#DSO: _start:
-#DSO-NEXT: 10024: {{.*}} b.eq #44
-#DSO-NEXT: 10028: {{.*}} b.eq #56
-#DSO-NEXT: 1002c: {{.*}} b.eq #68
+#DSO-NEXT: 10024: b.eq #44 <_foo at plt>
+#DSO-NEXT: 10028: b.eq #56 <_bar at plt>
+#DSO-NEXT: 1002c: b.eq #68 <_dah at plt>
#DSO-EMPTY:
#DSO-NEXT: Disassembly of section .plt:
#DSO-EMPTY:
#DSO-NEXT: .plt:
-#DSO-NEXT: 10030: {{.*}} stp x16, x30, [sp, #-16]!
-#DSO-NEXT: 10034: {{.*}} adrp x16, #131072
-#DSO-NEXT: 10038: {{.*}} ldr x17, [x16, #16]
-#DSO-NEXT: 1003c: {{.*}} add x16, x16, #16
-#DSO-NEXT: 10040: {{.*}} br x17
-#DSO-NEXT: 10044: {{.*}} nop
-#DSO-NEXT: 10048: {{.*}} nop
-#DSO-NEXT: 1004c: {{.*}} nop
+#DSO-NEXT: 10030: stp x16, x30, [sp, #-16]!
+#DSO-NEXT: 10034: adrp x16, #131072
+#DSO-NEXT: 10038: ldr x17, [x16, #16]
+#DSO-NEXT: 1003c: add x16, x16, #16
+#DSO-NEXT: 10040: br x17
+#DSO-NEXT: 10044: nop
+#DSO-NEXT: 10048: nop
+#DSO-NEXT: 1004c: nop
#DSO-EMPTY:
#DSO-NEXT: _foo at plt:
-#DSO-NEXT: 10050: {{.*}} adrp x16, #131072
-#DSO-NEXT: 10054: {{.*}} ldr x17, [x16, #24]
-#DSO-NEXT: 10058: {{.*}} add x16, x16, #24
-#DSO-NEXT: 1005c: {{.*}} br x17
+#DSO-NEXT: 10050: adrp x16, #131072
+#DSO-NEXT: 10054: ldr x17, [x16, #24]
+#DSO-NEXT: 10058: add x16, x16, #24
+#DSO-NEXT: 1005c: br x17
#DSO-EMPTY:
#DSO-NEXT: _bar at plt:
-#DSO-NEXT: 10060: {{.*}} adrp x16, #131072
-#DSO-NEXT: 10064: {{.*}} ldr x17, [x16, #32]
-#DSO-NEXT: 10068: {{.*}} add x16, x16, #32
-#DSO-NEXT: 1006c: {{.*}} br x17
+#DSO-NEXT: 10060: adrp x16, #131072
+#DSO-NEXT: 10064: ldr x17, [x16, #32]
+#DSO-NEXT: 10068: add x16, x16, #32
+#DSO-NEXT: 1006c: br x17
#DSO-EMPTY:
#DSO-NEXT: _dah at plt:
-#DSO-NEXT: 10070: {{.*}} adrp x16, #131072
-#DSO-NEXT: 10074: {{.*}} ldr x17, [x16, #40]
-#DSO-NEXT: 10078: {{.*}} add x16, x16, #40
-#DSO-NEXT: 1007c: {{.*}} br x17
+#DSO-NEXT: 10070: adrp x16, #131072
+#DSO-NEXT: 10074: ldr x17, [x16, #40]
+#DSO-NEXT: 10078: add x16, x16, #40
+#DSO-NEXT: 1007c: br x17
.globl _start
_start:
Modified: lld/trunk/test/ELF/aarch64-copy.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-copy.s?rev=366532&r1=366531&r2=366532&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-copy.s (original)
+++ lld/trunk/test/ELF/aarch64-copy.s Thu Jul 18 23:33:36 2019
@@ -2,10 +2,10 @@
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %p/Inputs/relocation-copy.s -o %t2.o
// RUN: ld.lld -shared %t2.o -soname fixed-length-string.so -o %t2.so
-// RUN: ld.lld %t.o %t2.so -o %t3
-// RUN: llvm-readobj -S -r --expand-relocs --symbols %t3 | FileCheck %s
-// RUN: llvm-objdump -d %t3 | FileCheck -check-prefix=CODE %s
-// RUN: llvm-objdump -s -section=.rodata %t3 | FileCheck -check-prefix=RODATA %s
+// RUN: ld.lld %t.o %t2.so -o %t
+// RUN: llvm-readobj -S -r --symbols %t | FileCheck %s
+// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck -check-prefix=CODE %s
+// RUN: llvm-objdump -s -section=.rodata %t | FileCheck -check-prefix=RODATA %s
.text
.globl _start
@@ -31,24 +31,9 @@ _start:
// CHECK: Relocations [
// CHECK-NEXT: Section ({{.*}}) .rela.dyn {
-// CHECK-NEXT: Relocation {
-// CHECK-NEXT: Offset: 0x230000
-// CHECK-NEXT: Type: R_AARCH64_COPY
-// CHECK-NEXT: Symbol: x
-// CHECK-NEXT: Addend: 0x0
-// CHECK-NEXT: }
-// CHECK-NEXT: Relocation {
-// CHECK-NEXT: Offset: 0x230010
-// CHECK-NEXT: Type: R_AARCH64_COPY
-// CHECK-NEXT: Symbol: y
-// CHECK-NEXT: Addend: 0x0
-// CHECK-NEXT: }
-// CHECK-NEXT: Relocation {
-// CHECK-NEXT: Offset: 0x230014
-// CHECK-NEXT: Type: R_AARCH64_COPY
-// CHECK-NEXT: Symbol: z
-// CHECK-NEXT: Addend: 0x0
-// CHECK-NEXT: }
+// CHECK-NEXT: 0x230000 R_AARCH64_COPY x 0x0
+// CHECK-NEXT: 0x230010 R_AARCH64_COPY y 0x0
+// CHECK-NEXT: 0x230014 R_AARCH64_COPY z 0x0
// CHECK-NEXT: }
// CHECK-NEXT: ]
@@ -81,13 +66,13 @@ _start:
// CODE-NEXT: _start:
// S(x) = 0x230000, A = 0, P = 0x210000
// S + A - P = 0x20000 = 131072
-// CODE-NEXT: 210000: {{.*}} adr x1, #131072
+// CODE-NEXT: 210000: adr x1, #131072
// S(y) = 0x230010, A = 0, P = 0x210004
// Page(S + A) - Page(P) = 0x230000 - 0x210000 = 0x20000 = 131072
-// CODE-NEXT: 210004: {{.*}} adrp x2, #131072
+// CODE-NEXT: 210004: adrp x2, #131072
// S(y) = 0x230010, A = 0
// (S + A) & 0xFFF = 0x10 = 16
-// CODE-NEXT: 210008: {{.*}} add x2, x2, #16
+// CODE-NEXT: 210008: add x2, x2, #16
// RODATA: Contents of section .rodata:
// S(z) = 0x230014
Modified: lld/trunk/test/ELF/aarch64-gnu-ifunc-plt.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-gnu-ifunc-plt.s?rev=366532&r1=366531&r2=366532&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-gnu-ifunc-plt.s (original)
+++ lld/trunk/test/ELF/aarch64-gnu-ifunc-plt.s Thu Jul 18 23:33:36 2019
@@ -1,9 +1,9 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %S/Inputs/shared2.s -o %t1.o
-// RUN: ld.lld %t1.o --shared -o %t.so
+// RUN: ld.lld %t1.o --shared --soname=t.so -o %t.so
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
// RUN: ld.lld --hash-style=sysv %t.so %t.o -o %tout
-// RUN: llvm-objdump -d %tout | FileCheck %s --check-prefix=DISASM
+// RUN: llvm-objdump -d --no-show-raw-insn %tout | FileCheck %s --check-prefix=DISASM
// RUN: llvm-objdump -s %tout | FileCheck %s --check-prefix=GOTPLT
// RUN: llvm-readobj -r --dynamic-table %tout | FileCheck %s
@@ -32,46 +32,46 @@
// DISASM: Disassembly of section .text:
// DISASM-EMPTY:
// DISASM-NEXT: foo:
-// DISASM-NEXT: 210000: {{.*}} ret
+// DISASM-NEXT: 210000: ret
// DISASM: bar:
-// DISASM-NEXT: 210004: {{.*}} ret
+// DISASM-NEXT: 210004: ret
// DISASM: _start:
-// DISASM-NEXT: 210008: {{.*}} bl #88
-// DISASM-NEXT: 21000c: {{.*}} bl #100
-// DISASM-NEXT: 210010: {{.*}} bl #48
-// DISASM-NEXT: 210014: {{.*}} bl #60
+// DISASM-NEXT: 210008: bl #88
+// DISASM-NEXT: 21000c: bl #100
+// DISASM-NEXT: 210010: bl #48
+// DISASM-NEXT: 210014: bl #60
// DISASM-EMPTY:
// DISASM-NEXT: Disassembly of section .plt:
// DISASM-EMPTY:
// DISASM-NEXT: .plt:
-// DISASM-NEXT: 210020: {{.*}} stp x16, x30, [sp, #-16]!
-// DISASM-NEXT: 210024: {{.*}} adrp x16, #131072
-// DISASM-NEXT: 210028: {{.*}} ldr x17, [x16, #16]
-// DISASM-NEXT: 21002c: {{.*}} add x16, x16, #16
-// DISASM-NEXT: 210030: {{.*}} br x17
-// DISASM-NEXT: 210034: {{.*}} nop
-// DISASM-NEXT: 210038: {{.*}} nop
-// DISASM-NEXT: 21003c: {{.*}} nop
+// DISASM-NEXT: 210020: stp x16, x30, [sp, #-16]!
+// DISASM-NEXT: 210024: adrp x16, #131072
+// DISASM-NEXT: 210028: ldr x17, [x16, #16]
+// DISASM-NEXT: 21002c: add x16, x16, #16
+// DISASM-NEXT: 210030: br x17
+// DISASM-NEXT: 210034: nop
+// DISASM-NEXT: 210038: nop
+// DISASM-NEXT: 21003c: nop
// DISASM-EMPTY:
// DISASM-NEXT: bar2 at plt:
-// DISASM-NEXT: 210040: {{.*}} adrp x16, #131072
-// DISASM-NEXT: 210044: {{.*}} ldr x17, [x16, #24]
-// DISASM-NEXT: 210048: {{.*}} add x16, x16, #24
-// DISASM-NEXT: 21004c: {{.*}} br x17
+// DISASM-NEXT: 210040: adrp x16, #131072
+// DISASM-NEXT: 210044: ldr x17, [x16, #24]
+// DISASM-NEXT: 210048: add x16, x16, #24
+// DISASM-NEXT: 21004c: br x17
// DISASM-EMPTY:
// DISASM-NEXT: zed2 at plt:
-// DISASM-NEXT: 210050: {{.*}} adrp x16, #131072
-// DISASM-NEXT: 210054: {{.*}} ldr x17, [x16, #32]
-// DISASM-NEXT: 210058: {{.*}} add x16, x16, #32
-// DISASM-NEXT: 21005c: {{.*}} br x17
-// DISASM-NEXT: 210060: {{.*}} adrp x16, #131072
-// DISASM-NEXT: 210064: {{.*}} ldr x17, [x16, #40]
-// DISASM-NEXT: 210068: {{.*}} add x16, x16, #40
-// DISASM-NEXT: 21006c: {{.*}} br x17
-// DISASM-NEXT: 210070: {{.*}} adrp x16, #131072
-// DISASM-NEXT: 210074: {{.*}} ldr x17, [x16, #48]
-// DISASM-NEXT: 210078: {{.*}} add x16, x16, #48
-// DISASM-NEXT: 21007c: {{.*}} br x17
+// DISASM-NEXT: 210050: adrp x16, #131072
+// DISASM-NEXT: 210054: ldr x17, [x16, #32]
+// DISASM-NEXT: 210058: add x16, x16, #32
+// DISASM-NEXT: 21005c: br x17
+// DISASM-NEXT: 210060: adrp x16, #131072
+// DISASM-NEXT: 210064: ldr x17, [x16, #40]
+// DISASM-NEXT: 210068: add x16, x16, #40
+// DISASM-NEXT: 21006c: br x17
+// DISASM-NEXT: 210070: adrp x16, #131072
+// DISASM-NEXT: 210074: ldr x17, [x16, #48]
+// DISASM-NEXT: 210078: add x16, x16, #48
+// DISASM-NEXT: 21007c: br x17
.text
.type foo STT_GNU_IFUNC
Modified: lld/trunk/test/ELF/aarch64-gnu-ifunc2.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-gnu-ifunc2.s?rev=366532&r1=366531&r2=366532&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-gnu-ifunc2.s (original)
+++ lld/trunk/test/ELF/aarch64-gnu-ifunc2.s Thu Jul 18 23:33:36 2019
@@ -1,8 +1,9 @@
# REQUIRES: aarch64
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
-# RUN: ld.lld -static %t.o -o %tout
-# RUN: llvm-objdump -D %tout | FileCheck %s
-# RUN: llvm-readobj -r %tout | FileCheck %s --check-prefix=RELOC
+# RUN: ld.lld %t.o -o %t
+# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
+# RUN: llvm-readelf -S %t | FileCheck %s --check-prefix=SEC
+# RUN: llvm-readobj -r %t | FileCheck %s --check-prefix=RELOC
# CHECK: Disassembly of section .text:
# CHECK-EMPTY:
@@ -11,23 +12,20 @@
# CHECK: main:
# adrp x8, 0x220000, 0x220000 == address in .got.plt
-# CHECK-NEXT: 210004: {{.*}} adrp x8, #65536
-# CHECK-NEXT: 210008: {{.*}} ldr x8, [x8]
-# CHECK-NEXT: 21000c: {{.*}} ret
+# CHECK-NEXT: 210004: adrp x8, #65536
+# CHECK-NEXT: 210008: ldr x8, [x8]
+# CHECK-NEXT: 21000c: ret
# CHECK: Disassembly of section .plt:
# CHECK-EMPTY:
# CHECK-NEXT: .plt:
# adrp x16, 0x220000, 0x220000 == address in .got.plt
-# CHECK-NEXT: 210010: {{.*}} adrp x16, #65536
-# CHECK-NEXT: 210014: {{.*}} ldr x17, [x16]
-# CHECK-NEXT: 210018: {{.*}} add x16, x16, #0
-# CHECK-NEXT: 21001c: {{.*}} br x17
+# CHECK-NEXT: 210010: adrp x16, #65536
+# CHECK-NEXT: 210014: ldr x17, [x16]
+# CHECK-NEXT: 210018: add x16, x16, #0
+# CHECK-NEXT: 21001c: br x17
-# CHECK: Disassembly of section .got.plt:
-# CHECK-EMPTY:
-# CHECK-NEXT: .got.plt:
-# CHECK-NEXT: 220000:
+# SEC: .got.plt PROGBITS 0000000000220000 020000 000008 00 WA 0 0 8
# RELOC: Relocations [
# RELOC-NEXT: Section {{.*}} .rela.plt {
Modified: lld/trunk/test/ELF/aarch64-jump26-thunk.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-jump26-thunk.s?rev=366532&r1=366531&r2=366532&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-jump26-thunk.s (original)
+++ lld/trunk/test/ELF/aarch64-jump26-thunk.s Thu Jul 18 23:33:36 2019
@@ -1,8 +1,8 @@
// REQUIRES: aarch64
-// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %S/Inputs/abs.s -o %tabs
-// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %s -o %t
-// RUN: ld.lld %t %tabs -o %t2 2>&1
-// RUN: llvm-objdump -d -triple=aarch64-pc-freebsd %t2 | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %S/Inputs/abs.s -o %tabs.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %s -o %t.o
+// RUN: ld.lld %t.o %tabs.o -o %t
+// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
.text
.globl _start
@@ -12,10 +12,10 @@ _start:
// CHECK: Disassembly of section .text:
// CHECK-EMPTY:
// CHECK-NEXT: _start:
-// CHECK-NEXT: 210000: 02 00 00 14 b #8
+// CHECK-NEXT: 210000: b #8
// CHECK: __AArch64AbsLongThunk_big:
-// CHECK-NEXT: 210008: 50 00 00 58 ldr x16, #8
-// CHECK-NEXT: 21000c: 00 02 1f d6 br x16
+// CHECK-NEXT: 210008: ldr x16, #8
+// CHECK-NEXT: 21000c: br x16
// CHECK: $d:
-// CHECK-NEXT: 210010: 00 00 00 00 .word 0x00000000
-// CHECK-NEXT: 210014: 10 00 00 00 .word 0x00000010
+// CHECK-NEXT: 210010: 00 00 00 00 .word 0x00000000
+// CHECK-NEXT: 210014: 10 00 00 00 .word 0x00000010
Modified: lld/trunk/test/ELF/aarch64-nopic-plt.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-nopic-plt.s?rev=366532&r1=366531&r2=366532&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-nopic-plt.s (original)
+++ lld/trunk/test/ELF/aarch64-nopic-plt.s Thu Jul 18 23:33:36 2019
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=aarch64-pc-linux
// RUN: llvm-mc %p/Inputs/aarch64-copy2.s -o %t2.o -filetype=obj -triple=aarch64-pc-linux
-// RUN: ld.lld %t2.o -o %t2.so -shared
+// RUN: ld.lld %t2.o -o %t2.so -shared -soname=t2.so
// RUN: ld.lld %t.o %t2.so -o %t
// RUN: llvm-readobj --symbols %t | FileCheck %s
Modified: lld/trunk/test/ELF/aarch64-tls-gdie.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tls-gdie.s?rev=366532&r1=366531&r2=366532&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-tls-gdie.s (original)
+++ lld/trunk/test/ELF/aarch64-tls-gdie.s Thu Jul 18 23:33:36 2019
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=aarch64-pc-linux
// RUN: llvm-mc %p/Inputs/aarch64-tls-gdie.s -o %t2.o -filetype=obj -triple=aarch64-pc-linux
-// RUN: ld.lld %t2.o -o %t2.so -shared
+// RUN: ld.lld %t2.o -o %t2.so -shared -soname=t2.so
// RUN: ld.lld --hash-style=sysv %t.o %t2.so -o %t
// RUN: llvm-readobj -S %t | FileCheck --check-prefix=SEC %s
// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
Modified: lld/trunk/test/ELF/aarch64-tls-gdle.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tls-gdle.s?rev=366532&r1=366531&r2=366532&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-tls-gdle.s (original)
+++ lld/trunk/test/ELF/aarch64-tls-gdle.s Thu Jul 18 23:33:36 2019
@@ -10,13 +10,11 @@
# RELOC-NEXT: ]
# TCB size = 0x16 and foo is first element from TLS register.
-# CHECK: Disassembly of section .text:
-# CHECK-EMPTY:
-# CHECK: _start:
-# CHECK: 210000: movz x0, #0, lsl #16
-# CHECK: 210004: movk x0, #16
-# CHECK: 210008: nop
-# CHECK: 21000c: nop
+# CHECK-LABEL: _start:
+# CHECK-NEXT: 210000: movz x0, #0, lsl #16
+# CHECK-NEXT: 210004: movk x0, #16
+# CHECK-NEXT: 210008: nop
+# CHECK-NEXT: 21000c: nop
.globl _start
_start:
Modified: lld/trunk/test/ELF/aarch64-tls-ie.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tls-ie.s?rev=366532&r1=366531&r2=366532&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-tls-ie.s (original)
+++ lld/trunk/test/ELF/aarch64-tls-ie.s Thu Jul 18 23:33:36 2019
@@ -1,7 +1,7 @@
# REQUIRES: aarch64
# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %p/Inputs/aarch64-tls-ie.s -o %tdso.o
# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %tmain.o
-# RUN: ld.lld -shared %tdso.o -o %tdso.so
+# RUN: ld.lld -shared -soname=tdso.so %tdso.o -o %tdso.so
# RUN: ld.lld --hash-style=sysv %tmain.o %tdso.so -o %tout
# RUN: llvm-objdump -d --no-show-raw-insn %tout | FileCheck %s
# RUN: llvm-readobj -S -r %tout | FileCheck -check-prefix=RELOC %s
Removed: lld/trunk/test/ELF/aarch64-tls-static.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tls-static.s?rev=366531&view=auto
==============================================================================
--- lld/trunk/test/ELF/aarch64-tls-static.s (original)
+++ lld/trunk/test/ELF/aarch64-tls-static.s (removed)
@@ -1,37 +0,0 @@
-// REQUIRES: aarch64
-// RUN: llvm-mc %s -o %t.o -triple aarch64-pc-linux -filetype=obj
-// RUN: ld.lld --hash-style=sysv %t.o -o %t.so -shared
-// RUN: llvm-readobj -S %t.so | FileCheck --check-prefix=SEC %s
-// RUN: llvm-objdump -d %t.so | FileCheck %s
-
-foo:
- adrp x0, :tlsdesc:bar
- ldr x1, [x0, :tlsdesc_lo12:bar]
- add x0, x0, :tlsdesc_lo12:bar
- .tlsdesccall bar
- blr x1
-
-
- .section .tdata,"awT", at progbits
-bar:
- .word 42
-
-
-// SEC: Name: .got
-// SEC-NEXT: Type: SHT_PROGBITS
-// SEC-NEXT: Flags [
-// SEC-NEXT: SHF_ALLOC
-// SEC-NEXT: SHF_WRITE
-// SEC-NEXT: ]
-// SEC-NEXT: Address: 0x20098
-// SEC-NEXT: Offset: 0x20098
-// SEC-NEXT: Size: 16
-
-// page(0x20098) - page(0x10000) = 65536
-// 0x98 = 152
-
-// CHECK: foo:
-// CHECK-NEXT: 10000: {{.*}} adrp x0, #65536
-// CHECK-NEXT: 10004: {{.*}} ldr x1, [x0, #152]
-// CHECK-NEXT: 10008: {{.*}} add x0, x0, #152
-// CHECK-NEXT: 1000c: {{.*}} blr x1
Modified: lld/trunk/test/ELF/aarch64-tlsdesc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tlsdesc.s?rev=366532&r1=366531&r2=366532&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-tlsdesc.s (original)
+++ lld/trunk/test/ELF/aarch64-tlsdesc.s Thu Jul 18 23:33:36 2019
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-linux %s -o %t.o
// RUN: ld.lld --hash-style=sysv -shared %t.o -o %t.so
-// RUN: llvm-objdump -d %t.so | FileCheck %s
+// RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck %s
// RUN: llvm-readobj -r %t.so | FileCheck --check-prefix=REL %s
.text
@@ -15,10 +15,10 @@
// create target specific dynamic TLSDESC relocation where addend is
// the symbol VMA in tls block.
-// CHECK: 10000: {{.*}} adrp x0, #65536
-// CHECK-NEXT: 10004: {{.*}} ldr x1, [x0, #144]
-// CHECK-NEXT: 10008: {{.*}} add x0, x0, #144
-// CHECK-NEXT: 1000c: {{.*}} blr x1
+// CHECK: 10000: adrp x0, #65536
+// CHECK-NEXT: 10004: ldr x1, [x0, #144]
+// CHECK-NEXT: 10008: add x0, x0, #144
+// CHECK-NEXT: 1000c: blr x1
adrp x0, :tlsdesc:local1
ldr x1, [x0, :tlsdesc_lo12:local1]
@@ -26,10 +26,10 @@
.tlsdesccall a
blr x1
-// CHECK: 10010: {{.*}} adrp x0, #65536
-// CHECK-NEXT: 10014: {{.*}} ldr x1, [x0, #160]
-// CHECK-NEXT: 10018: {{.*}} add x0, x0, #160
-// CHECK-NEXT: 1001c: {{.*}} blr x1
+// CHECK: 10010: adrp x0, #65536
+// CHECK-NEXT: 10014: ldr x1, [x0, #160]
+// CHECK-NEXT: 10018: add x0, x0, #160
+// CHECK-NEXT: 1001c: blr x1
adrp x0, :tlsdesc:local2
ldr x1, [x0, :tlsdesc_lo12:local2]
@@ -37,10 +37,10 @@
.tlsdesccall a
blr x1
-// CHECK: 10020: {{.*}} adrp x0, #65536
-// CHECK-NEXT: 10024: {{.*}} ldr x1, [x0, #176]
-// CHECK-NEXT: 10028: {{.*}} add x0, x0, #176
-// CHECK-NEXT: 1002c: {{.*}} blr x1
+// CHECK: 10020: adrp x0, #65536
+// CHECK-NEXT: 10024: ldr x1, [x0, #176]
+// CHECK-NEXT: 10028: add x0, x0, #176
+// CHECK-NEXT: 1002c: blr x1
.section .tbss,"awT", at nobits
.type local1, at object
Modified: lld/trunk/test/ELF/aarch64-tstbr14-reloc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-tstbr14-reloc.s?rev=366532&r1=366531&r2=366532&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-tstbr14-reloc.s (original)
+++ lld/trunk/test/ELF/aarch64-tstbr14-reloc.s Thu Jul 18 23:33:36 2019
@@ -2,9 +2,9 @@
# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %p/Inputs/aarch64-tstbr14-reloc.s -o %t1
# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %t2
# RUN: ld.lld %t1 %t2 -o %t
-# RUN: llvm-objdump -d %t | FileCheck %s
+# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
# RUN: ld.lld -shared %t1 %t2 -o %t3
-# RUN: llvm-objdump -d %t3 | FileCheck -check-prefix=DSO %s
+# RUN: llvm-objdump -d --no-show-raw-insn %t3 | FileCheck -check-prefix=DSO %s
# RUN: llvm-readobj -S -r %t3 | FileCheck -check-prefix=DSOREL %s
# 0x1101c - 28 = 0x20000
@@ -14,19 +14,19 @@
# CHECK: Disassembly of section .text:
# CHECK-EMPTY:
# CHECK-NEXT: _foo:
-# CHECK-NEXT: 210000: {{.*}} nop
-# CHECK-NEXT: 210004: {{.*}} nop
-# CHECK-NEXT: 210008: {{.*}} nop
-# CHECK-NEXT: 21000c: {{.*}} nop
+# CHECK-NEXT: 210000: nop
+# CHECK-NEXT: 210004: nop
+# CHECK-NEXT: 210008: nop
+# CHECK-NEXT: 21000c: nop
# CHECK: _bar:
-# CHECK-NEXT: 210010: {{.*}} nop
-# CHECK-NEXT: 210014: {{.*}} nop
-# CHECK-NEXT: 210018: {{.*}} nop
+# CHECK-NEXT: 210010: nop
+# CHECK-NEXT: 210014: nop
+# CHECK-NEXT: 210018: nop
# CHECK: _start:
-# CHECK-NEXT: 21001c: {{.*}} tbnz w3, #15, #-28
-# CHECK-NEXT: 210020: {{.*}} tbnz w3, #15, #-16
-# CHECK-NEXT: 210024: {{.*}} tbz x6, #45, #-36
-# CHECK-NEXT: 210028: {{.*}} tbz x6, #45, #-24
+# CHECK-NEXT: 21001c: tbnz w3, #15, #-28
+# CHECK-NEXT: 210020: tbnz w3, #15, #-16
+# CHECK-NEXT: 210024: tbz x6, #45, #-36
+# CHECK-NEXT: 210028: tbz x6, #45, #-24
#DSOREL: Section {
#DSOREL: Index:
@@ -54,47 +54,47 @@
#DSO: Disassembly of section .text:
#DSO-EMPTY:
#DSO-NEXT: _foo:
-#DSO-NEXT: 10000: {{.*}} nop
-#DSO-NEXT: 10004: {{.*}} nop
-#DSO-NEXT: 10008: {{.*}} nop
-#DSO-NEXT: 1000c: {{.*}} nop
+#DSO-NEXT: 10000: nop
+#DSO-NEXT: 10004: nop
+#DSO-NEXT: 10008: nop
+#DSO-NEXT: 1000c: nop
#DSO: _bar:
-#DSO-NEXT: 10010: {{.*}} nop
-#DSO-NEXT: 10014: {{.*}} nop
-#DSO-NEXT: 10018: {{.*}} nop
+#DSO-NEXT: 10010: nop
+#DSO-NEXT: 10014: nop
+#DSO-NEXT: 10018: nop
#DSO: _start:
# 0x1001c + 52 = 0x10050 = PLT[1]
# 0x10020 + 64 = 0x10060 = PLT[2]
# 0x10024 + 44 = 0x10050 = PLT[1]
# 0x10028 + 56 = 0x10060 = PLT[2]
-#DSO-NEXT: 1001c: {{.*}} tbnz w3, #15, #52
-#DSO-NEXT: 10020: {{.*}} tbnz w3, #15, #64
-#DSO-NEXT: 10024: {{.*}} tbz x6, #45, #44
-#DSO-NEXT: 10028: {{.*}} tbz x6, #45, #56
+#DSO-NEXT: 1001c: tbnz w3, #15, #52
+#DSO-NEXT: 10020: tbnz w3, #15, #64
+#DSO-NEXT: 10024: tbz x6, #45, #44
+#DSO-NEXT: 10028: tbz x6, #45, #56
#DSO-EMPTY:
#DSO-NEXT: Disassembly of section .plt:
#DSO-EMPTY:
#DSO-NEXT: .plt:
-#DSO-NEXT: 10030: {{.*}} stp x16, x30, [sp, #-16]!
-#DSO-NEXT: 10034: {{.*}} adrp x16, #131072
-#DSO-NEXT: 10038: {{.*}} ldr x17, [x16, #16]
-#DSO-NEXT: 1003c: {{.*}} add x16, x16, #16
-#DSO-NEXT: 10040: {{.*}} br x17
-#DSO-NEXT: 10044: {{.*}} nop
-#DSO-NEXT: 10048: {{.*}} nop
-#DSO-NEXT: 1004c: {{.*}} nop
+#DSO-NEXT: 10030: stp x16, x30, [sp, #-16]!
+#DSO-NEXT: 10034: adrp x16, #131072
+#DSO-NEXT: 10038: ldr x17, [x16, #16]
+#DSO-NEXT: 1003c: add x16, x16, #16
+#DSO-NEXT: 10040: br x17
+#DSO-NEXT: 10044: nop
+#DSO-NEXT: 10048: nop
+#DSO-NEXT: 1004c: nop
#DSO-EMPTY:
#DSO-NEXT: _foo at plt:
-#DSO-NEXT: 10050: {{.*}} adrp x16, #131072
-#DSO-NEXT: 10054: {{.*}} ldr x17, [x16, #24]
-#DSO-NEXT: 10058: {{.*}} add x16, x16, #24
-#DSO-NEXT: 1005c: {{.*}} br x17
+#DSO-NEXT: 10050: adrp x16, #131072
+#DSO-NEXT: 10054: ldr x17, [x16, #24]
+#DSO-NEXT: 10058: add x16, x16, #24
+#DSO-NEXT: 1005c: br x17
#DSO-EMPTY:
#DSO-NEXT: _bar at plt:
-#DSO-NEXT: 10060: {{.*}} adrp x16, #131072
-#DSO-NEXT: 10064: {{.*}} ldr x17, [x16, #32]
-#DSO-NEXT: 10068: {{.*}} add x16, x16, #32
-#DSO-NEXT: 1006c: {{.*}} br x17
+#DSO-NEXT: 10060: adrp x16, #131072
+#DSO-NEXT: 10064: ldr x17, [x16, #32]
+#DSO-NEXT: 10068: add x16, x16, #32
+#DSO-NEXT: 1006c: br x17
.globl _start
_start:
Modified: lld/trunk/test/ELF/aarch64-undefined-weak.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-undefined-weak.s?rev=366532&r1=366531&r2=366532&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-undefined-weak.s (original)
+++ lld/trunk/test/ELF/aarch64-undefined-weak.s Thu Jul 18 23:33:36 2019
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t
-// RUN: ld.lld %t -o %t2 2>&1
-// RUN: llvm-objdump -triple=aarch64-none-linux -d %t2 | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
+// RUN: ld.lld %t.o -o %t
+// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
// Check that the ARM 64-bit ABI rules for undefined weak symbols are applied.
// Branch instructions are resolved to the next instruction. Undefined
@@ -36,15 +36,15 @@ _start:
// CHECK: Disassembly of section .text:
// CHECK-EMPTY:
// 2162688 = 0x210000
-// CHECK: 210000: {{.*}} b #4
-// CHECK-NEXT: 210004: {{.*}} bl #4
-// CHECK-NEXT: 210008: {{.*}} b.eq #4
-// CHECK-NEXT: 21000c: {{.*}} cbz x1, #4
-// CHECK-NEXT: 210010: {{.*}} adr x0, #0
-// CHECK-NEXT: 210014: {{.*}} adrp x0, #0
-// CHECK: 210018: {{.*}} .word 0x00000000
-// CHECK-NEXT: 21001c: {{.*}} .word 0x00000000
-// CHECK-NEXT: 210020: {{.*}} .word 0x00000000
-// CHECK-NEXT: 210024: {{.*}} .short 0x0000
+// CHECK: 210000: b #4
+// CHECK-NEXT: 210004: bl #4
+// CHECK-NEXT: 210008: b.eq #4
+// CHECK-NEXT: 21000c: cbz x1, #4
+// CHECK-NEXT: 210010: adr x0, #0
+// CHECK-NEXT: 210014: adrp x0, #0
+// CHECK: 210018: 00 00 00 00 .word 0x00000000
+// CHECK-NEXT: 21001c: 00 00 00 00 .word 0x00000000
+// CHECK-NEXT: 210020: 00 00 00 00 .word 0x00000000
+// CHECK-NEXT: 210024: 00 00 .short 0x0000
// CHECK: $x.2:
-// CHECK-NEXT: 210026: {{.*}} ldr x8, #0
+// CHECK-NEXT: 210026: ldr x8, #0
More information about the llvm-commits
mailing list