// REQUIRES: aarch64
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs255.s -o %t255.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs256.s -o %t256.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs257.s -o %t257.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs255.s -o %t255.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs256.s -o %t256.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs257.s -o %t257.o
.globl _start
_start:
.hword foo + 0xfeff
.hword foo - 0x8100
-// RUN: ld.lld %t.o %t256.o -o %t2
-// RUN: llvm-objdump -s --section=.data %t2 | FileCheck %s
+// RUN: ld.lld %t.o %t256.o -o %t
+// RUN: llvm-objdump -s --section=.data %t | FileCheck %s --check-prefixes=CHECK,LE
// CHECK: Contents of section .data:
// 220158: S = 0x100, A = 0xfeff
// S + A = 0xffff
// 22015c: S = 0x100, A = -0x8100
// S + A = 0x8000
-// CHECK-NEXT: 220158 ffff0080
+// LE-NEXT: 220158 ffff0080
// RUN: not ld.lld %t.o %t255.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW1
// OVERFLOW1: relocation R_AARCH64_ABS16 out of range: -32769 is not in [-32768, 65535]; references foo
// REQUIRES: aarch64
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs255.s -o %t255.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs256.s -o %t256.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs257.s -o %t257.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs255.s -o %t255.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs256.s -o %t256.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs257.s -o %t257.o
.globl _start
_start:
.word foo + 0xfffffeff
.word foo - 0x80000100
-// RUN: ld.lld %t.o %t256.o -o %t2
-// RUN: llvm-objdump -s --section=.data %t2 | FileCheck %s
+// RUN: ld.lld %t.o %t256.o -o %t
+// RUN: llvm-objdump -s --section=.data %t | FileCheck %s --check-prefixes=CHECK,LE
// CHECK: Contents of section .data:
// 220158: S = 0x100, A = 0xfffffeff
// S + A = 0xffffffff
// 22015c: S = 0x100, A = -0x80000100
// S + A = 0x80000000
-// CHECK-NEXT: 220158 ffffffff 00000080
+// LE-NEXT: 220158 ffffffff 00000080
// RUN: not ld.lld %t.o %t255.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW1
// OVERFLOW1: relocation R_AARCH64_ABS32 out of range: -2147483649 is not in [-2147483648, 4294967295]; references foo
// REQUIRES: aarch64
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs256.s -o %t256.o
-// RUN: ld.lld %t %t256.o -o %t2
-// RUN: llvm-objdump -s %t2 | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs256.s -o %t256.o
+// RUN: ld.lld %t.o %t256.o -o %t
+// RUN: llvm-objdump -s %t | FileCheck %s --check-prefixes=CHECK,LE
.globl _start
_start:
// S = 0x100, A = 0x24
// S + A = 0x124
// CHECK: Contents of section .R_AARCH64_ABS64:
-// CHECK-NEXT: 210120 24010000 00000000
+// LE-NEXT: 210120 24010000 00000000
.section .R_AARCH64_PREL64, "ax",@progbits
.xword foo - . + 0x24
// S + A - P = 0x100 + 0x24 - 0x210128 = 0xffffffffffdefffc
// CHECK: Contents of section .R_AARCH64_PREL64:
-// CHECK-NEXT: 210128 fcffdeff ffffffff
+// LE-NEXT: 210128 fcffdeff ffffffff
// REQUIRES: aarch64
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs255.s -o %t255.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs256.s -o %t256.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs257.s -o %t257.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs255.s -o %t255.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs256.s -o %t256.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs257.s -o %t257.o
.globl _start
_start:
// the change of the address of the .data section.
// You may found the correct address in the aarch64_abs16.s test,
// if it is already fixed. Then, update addends accordingly.
-// RUN: ld.lld -z max-page-size=4096 %t.o %t256.o -o %t2
-// RUN: llvm-objdump -s --section=.data %t2 | FileCheck %s
+// RUN: ld.lld -z max-page-size=4096 %t.o %t256.o -o %t
+// RUN: llvm-objdump -s --section=.data %t | FileCheck %s --check-prefixes=CHECK,LE
// CHECK: Contents of section .data:
// 202158: S = 0x100, A = 0x212157, P = 0x202158
// S + A - P = 0xffff
// 212a5a: S = 0x100, A = 0x1fa05a, P = 0x20215a
// S + A - P = 0x8000
-// CHECK-NEXT: 202158 ffff0080
+// LE-NEXT: 202158 ffff0080
// RUN: not ld.lld -z max-page-size=4096 %t.o %t255.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW1
// OVERFLOW1: relocation R_AARCH64_PREL16 out of range: -32769 is not in [-32768, 65535]; references foo
// REQUIRES: aarch64
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs255.s -o %t255.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs256.s -o %t256.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs257.s -o %t257.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs255.s -o %t255.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs256.s -o %t256.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs257.s -o %t257.o
.globl _start
_start:
// the change of the address of the .data section.
// You may found the correct address in the aarch64_abs32.s test,
// if it is already fixed. Then, update addends accordingly.
-// RUN: ld.lld -z max-page-size=4096 %t.o %t256.o -o %t2
-// RUN: llvm-objdump -s --section=.data %t2 | FileCheck %s
+// RUN: ld.lld -z max-page-size=4096 %t.o %t256.o -o %t
+// RUN: llvm-objdump -s --section=.data %t | FileCheck %s --check-prefixes=CHECK,LE
// CHECK: Contents of section .data:
// 202158: S = 0x100, A = 0x100202057, P = 0x202158
// S + A - P = 0xffffffff
// 20215c: S = 0x100, A = -0x7fdfdfa4, P = 0x20215c
// S + A - P = 0x80000000
-// CHECK-NEXT: 202158 ffffffff 00000080
+// LE-NEXT: 202158 ffffffff 00000080
// RUN: not ld.lld -z max-page-size=4096 %t.o %t255.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW1
// OVERFLOW1: relocation R_AARCH64_PREL32 out of range: -2147483649 is not in [-2147483648, 4294967295]; references foo
# REQUIRES: aarch64
-# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %taarch64
-# RUN: ld.lld -m aarch64linux %taarch64 -o %t2aarch64
-# RUN: llvm-readobj --file-headers %t2aarch64 | FileCheck --check-prefix=AARCH64 %s
-# RUN: ld.lld -m aarch64elf %taarch64 -o %t3aarch64
-# RUN: llvm-readobj --file-headers %t3aarch64 | FileCheck --check-prefix=AARCH64 %s
-# RUN: ld.lld -m aarch64_elf64_le_vec %taarch64 -o %t4aarch64
-# RUN: llvm-readobj --file-headers %t4aarch64 | FileCheck --check-prefix=AARCH64 %s
-# RUN: ld.lld %taarch64 -o %t5aarch64
-# RUN: llvm-readobj --file-headers %t5aarch64 | FileCheck --check-prefix=AARCH64 %s
-# RUN: echo 'OUTPUT_FORMAT(elf64-littleaarch64)' > %t4aarch64.script
-# RUN: ld.lld %t4aarch64.script %taarch64 -o %t4aarch64
-# RUN: llvm-readobj --file-headers %t4aarch64 | FileCheck --check-prefix=AARCH64 %s
+# RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
+# RUN: ld.lld %t.o -o %t
+# RUN: llvm-readobj --file-headers %t | FileCheck --check-prefixes=AARCH64,LE %s
+# RUN: ld.lld -m aarch64linux %t.o -o %t1
+# RUN: llvm-readobj --file-headers %t1 | FileCheck --check-prefixes=AARCH64,LE %s
+# RUN: ld.lld -m aarch64elf %t.o -o %t2
+# RUN: llvm-readobj --file-headers %t2 | FileCheck --check-prefixes=AARCH64,LE %s
+# RUN: echo 'OUTPUT_FORMAT(elf64-littleaarch64)' > %t.script
+# RUN: ld.lld %t.script %t.o -o %t3
+# RUN: llvm-readobj --file-headers %t3 | FileCheck --check-prefixes=AARCH64,LE %s
+# RUN: ld.lld -m aarch64_elf64_le_vec %t.o -o %taosp
+# RUN: llvm-readobj --file-headers %taosp | FileCheck --check-prefixes=AARCH64,LE %s
+
# AARCH64: ElfHeader {
# AARCH64-NEXT: Ident {
# AARCH64-NEXT: Magic: (7F 45 4C 46)
# AARCH64-NEXT: Class: 64-bit (0x2)
-# AARCH64-NEXT: DataEncoding: LittleEndian (0x1)
+# LE-NEXT: DataEncoding: LittleEndian (0x1)
# AARCH64-NEXT: FileVersion: 1
# AARCH64-NEXT: OS/ABI: SystemV (0x0)
# AARCH64-NEXT: ABIVersion: 0
# AARCH64-NEXT: Flags [ (0x0)
# AARCH64-NEXT: ]
-# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %taarch64fbsd
-# RUN: echo 'OUTPUT_FORMAT(elf64-aarch64-freebsd)' > %taarch64fbsd.script
-# RUN: ld.lld %taarch64fbsd.script %taarch64fbsd -o %t2aarch64fbsd
-# RUN: llvm-readobj --file-headers %t2aarch64fbsd | FileCheck --check-prefix=AARCH64-FBSD %s
+# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %tfbsd.o
+# RUN: echo 'OUTPUT_FORMAT(elf64-aarch64-freebsd)' > %tfbsd.script
+# RUN: ld.lld %tfbsd.script %tfbsd.o -o %tfbsd
+# RUN: llvm-readobj --file-headers %tfbsd | FileCheck --check-prefix=AARCH64-FBSD %s
# AARCH64-FBSD: ElfHeader {
# AARCH64-FBSD-NEXT: Ident {
# AARCH64-FBSD-NEXT: Magic: (7F 45 4C 46)