[ELF,test] Replace aarch64-none-* with aarch64

"none" is valid OS component and can cause confusion when used together
with linux/freebsd.
This commit is contained in:
Fangrui Song
2024-11-17 11:27:05 -08:00
parent 6d98f11f3b
commit ec950b2063
34 changed files with 40 additions and 40 deletions

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// Creates a R_AARCH64_ABS64 relocation against foo and bar
.globl foo

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: echo "SECTIONS { \
// RUN: .text : { *(.text) *(.text.*) *(.newisd) } \
// RUN: .text2 : { *.(newos) } \

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: ld.lld --fix-cortex-a53-843419 -z separate-code %t.o -o %t2
// RUN: llvm-objdump --triple=aarch64-linux-gnu -d %t2 --start-address=0x210000 --stop-address=0x21000c | FileCheck --check-prefix=CHECK1 %s
// RUN: llvm-objdump --triple=aarch64-linux-gnu -d %t2 --start-address=0x211000 --stop-address=0x211004 | FileCheck --check-prefix=CHECK2 %s

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: ld.lld --fix-cortex-a53-843419 -Ttext=0x8000000 %t.o -o %t2
// RUN: llvm-objdump -d --start-address=0x8001000 --stop-address=0x8001004 %t2 | FileCheck %s
/// The temporary files are more than 128MiB. Delete them early.

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: ld.lld -fix-cortex-a53-843419 -verbose -t %t.o -o /dev/null | FileCheck %s
// Test cases for Cortex-A53 Erratum 843419 that we don't expect to recognize
// as needing a patch as one or more of the conditions isn't satisfied.

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: ld.lld -fix-cortex-a53-843419 -z separate-code -verbose %t.o -o %t2 2>&1 | FileCheck -check-prefix CHECK-PRINT %s
// RUN: llvm-objdump --no-print-imm-hex --triple=aarch64-linux-gnu -d %t2 | FileCheck %s --check-prefixes=CHECK,CHECK-FIX
// RUN: ld.lld %t.o -z separate-code -o %t3

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: echo "SECTIONS { \
// RUN: .text 0x10000 : { \
// RUN: *(.text.01) ; \

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: echo "SECTIONS { \
// RUN: .text1 0x10000 : { *(.text.01) *(.text.02) *(.text.03) } \
// RUN: .text2 0x10010000 : { *(.text.04) } } " > %t.script

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: ld.lld -fix-cortex-a53-843419 %t.o -o %t2
// RUN: llvm-objdump --no-print-imm-hex --triple=aarch64-linux-gnu -d %t2 | FileCheck %s

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: relocation R_AARCH64_ABS16 cannot be used against symbol 'foo'; recompile with -fPIC
// CHECK-NEXT: >>> defined in {{.*}}.o

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: error: relocation R_AARCH64_ADD_ABS_LO12_NC cannot be used against symbol 'dat'; recompile with -fPIC
// CHECK: >>> defined in {{.*}}.o

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: error: relocation R_AARCH64_ADR_PREL_LO21 cannot be used against symbol 'dat'; recompile with -fPIC
// CHECK: >>> defined in {{.*}}.o

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol 'dat'; recompile with -fPIC
// CHECK: >>> defined in {{.*}}.o

View File

@@ -2,7 +2,7 @@
# RUN: rm -rf %t && split-file %s %t && cd %t
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %p/Inputs/shared.s -o lib.o
# RUN: llvm-mc -filetype=obj -triple=aarch64 %p/Inputs/shared.s -o lib.o
# RUN: ld.lld -shared lib.o -soname lib.so -o lib.so
## Checks if got access to dynamic objects is done through a got relative
@@ -13,7 +13,7 @@
#--- small.s
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux small.s -o small.o
# RUN: llvm-mc -filetype=obj -triple=aarch64 small.s -o small.o
# RUN: ld.lld lib.so small.o -o small
# RUN: llvm-readobj -r small | FileCheck --check-prefix=RELOC %s
# RUN: llvm-objdump -d --no-show-raw-insn small | FileCheck --check-prefix=DIS-SMALL %s
@@ -30,7 +30,7 @@ _start:
#--- tiny.s
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux tiny.s -o tiny.o
# RUN: llvm-mc -filetype=obj -triple=aarch64 tiny.s -o tiny.o
# RUN: ld.lld lib.so tiny.o -o tiny
# RUN: llvm-readobj -r tiny | FileCheck --check-prefix=RELOC %s
# RUN: llvm-objdump -d --no-show-raw-insn tiny | FileCheck --check-prefix=DIS-TINY %s

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: error: relocation R_AARCH64_LDST32_ABS_LO12_NC cannot be used against symbol 'dat'; recompile with -fPIC
// CHECK: >>> defined in {{.*}}.o

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: error: relocation R_AARCH64_LDST64_ABS_LO12_NC cannot be used against symbol 'dat'; recompile with -fPIC
// CHECK: >>> defined in {{.*}}.o

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: error: relocation R_AARCH64_LDST8_ABS_LO12_NC cannot be used against symbol 'dat'; recompile with -fPIC
// CHECK: >>> defined in {{.*}}.o

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: R_AARCH64_PREL16 cannot be used against symbol 'foo'; recompile with -fPIC
// CHECK: >>> defined in {{.*}}

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: error: relocation R_AARCH64_PREL32 cannot be used against symbol 'foo'; recompile with -fPIC
// CHECK: >>> defined in {{.*}}

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: error: relocation R_AARCH64_PREL64 cannot be used against symbol 'foo'; recompile with -fPIC
// CHECK: >>> defined in {{.*}}

View File

@@ -1,5 +1,5 @@
# REQUIRES: aarch64
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
# RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
# RUN: ld.lld -shared %t.o -o %tout
# RUN: llvm-objdump --no-print-imm-hex -D --no-show-raw-insn %tout | FileCheck %s
# RUN: llvm-readobj -r %tout | FileCheck %s --check-prefix=CHECK-RELOCS

View File

@@ -1,5 +1,5 @@
# REQUIRES: aarch64
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
# RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
# RUN: ld.lld --no-relax %t.o -o %t
# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t | FileCheck %s --check-prefix=PDE

View File

@@ -1,5 +1,5 @@
# REQUIRES: aarch64
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
# RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
# RUN: ld.lld %t.o -o %t
# RUN: llvm-readelf -S -s %t | FileCheck %s --check-prefix=SEC
# RUN: llvm-readelf -x .rodata -x .data %t | FileCheck --check-prefix=HEX %s

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: ld.lld -static %t.o -o %tout
// RUN: llvm-readobj --symbols %tout | FileCheck %s

View File

@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %S/Inputs/shared2.s -o %t1.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/shared2.s -o %t1.o
// 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: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: ld.lld --hash-style=sysv %t.so %t.o -o %tout
// RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %tout | FileCheck %s --check-prefix=DISASM
// RUN: llvm-objdump -s %tout | FileCheck %s --check-prefix=GOTPLT

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: ld.lld -static %t.o -o %tout
// RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %tout | FileCheck %s --check-prefix=DISASM
// RUN: llvm-readobj -r --symbols --sections %tout | FileCheck %s

View File

@@ -1,5 +1,5 @@
# REQUIRES: aarch64
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
# RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
# RUN: ld.lld %t.o -o %t
# RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t | FileCheck %s
# RUN: llvm-readelf -S %t | FileCheck %s --check-prefix=SEC

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: ld.lld %t.o -o %t
// RUN: llvm-readelf -r %t | FileCheck --check-prefix=RELOC %s
// RUN: llvm-readelf -x .got %t | FileCheck %s

View File

@@ -1,6 +1,6 @@
# REQUIRES: aarch64
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %p/Inputs/aarch64-addrifunc.s -o %t1.o
# RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
# RUN: llvm-mc -filetype=obj -triple=aarch64 %p/Inputs/aarch64-addrifunc.s -o %t1.o
# RUN: ld.lld --shared --soname=t1.so %t1.o -o %t1.so
# RUN: ld.lld --pie %t1.so %t.o -o %t

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t
// RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck %s
// Test derived from a typical ODR violation where a global is declared

View File

@@ -5,7 +5,7 @@
## maintained, i.e. new versions of the linker will still produce binaries that
## can be run on these versions of Android.
# RUN: llvm-mc --filetype=obj -triple=aarch64-none-linux-android %s -o %t.o
# RUN: llvm-mc --filetype=obj -triple=aarch64-linux-android %s -o %t.o
# RUN: ld.lld -shared --android-memtag-mode=async --android-memtag-heap %t.o -o %t
# RUN: llvm-readelf --memtag %t | FileCheck %s --check-prefixes=CHECK,HEAP,NOSTACK,ASYNC

View File

@@ -54,9 +54,9 @@ Symbols:
## Functional testing for MTE globals.
# RUN: split-file %S/Inputs/aarch64-memtag-globals.s %t
# RUN: llvm-mc --filetype=obj -triple=aarch64-none-linux-android \
# RUN: llvm-mc --filetype=obj -triple=aarch64-linux-android \
# RUN: %t/input_1.s -o %t1.o
# RUN: llvm-mc --filetype=obj -triple=aarch64-none-linux-android \
# RUN: llvm-mc --filetype=obj -triple=aarch64-linux-android \
# RUN: %t/input_2.s -o %t2.o
# RUN: ld.lld -shared --android-memtag-mode=sync %t1.o %t2.o -o %t.so
@@ -76,7 +76,7 @@ Symbols:
## Ensure that fully statically linked executables just simply drop the MTE
## globals stuff: special relocations, data in the place to be relocated,
## dynamic entries, etc.
# RUN: llvm-mc --filetype=obj -triple=aarch64-none-linux-android \
# RUN: llvm-mc --filetype=obj -triple=aarch64-linux-android \
# RUN: %t/input_3.s -o %t3.o
# RUN: ld.lld -static --android-memtag-mode=sync %t1.o %t2.o %t3.o -o %t.static.so
# RUN: llvm-readelf -s --section-headers --relocs --memtag %t.static.so | \

View File

@@ -1,5 +1,5 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: ld.lld --image-base=0x10000000 %t.o -o %t
// RUN: llvm-objdump -d -z --no-show-raw-insn %t | FileCheck %s

View File

@@ -1,6 +1,6 @@
// REQUIRES: arm, aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-android %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=aarch64-linux-android %s -o %t.o
// RUN: ld.lld -shared %t.o -o %t.so --pack-dyn-relocs=android -z norelro -z separate-code
// RUN: llvm-readobj -S %t.so | FileCheck %s