Files
clang-p2996/lld/test/MachO/header.s
Vincent Lee ed59b8a11c [lld-macho] Remove partially supported 32-bit ARM arch
We never really supported 32-bit ARM arch entirely, and partial support was added for
very specific features. Regardless, it fails to even link the most basic applications that at
this point, it might be better to move this arch as unsupported. Given that Apple will be
moving towards arm64 long term, I don't see any reason for anyone to invest time in
supporting this either, and for those who still need it should use apple's ld64 linker.

Fixes #62691

Reviewed By: #lld-macho, int3

Differential Revision: https://reviews.llvm.org/D150544
2023-05-20 13:06:03 -07:00

29 lines
1.7 KiB
ArmAsm

# REQUIRES: x86, aarch64
# RUN: rm -rf %t && mkdir -p %t
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/x86-64-test.o
# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t/arm64-test.o
# RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-watchos %s -o %t/arm64-32-test.o
# RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-watchos %s -o %t/arm64-32-test.o
# RUN: %lld -lSystem -arch x86_64 -o %t/x86-64-executable %t/x86-64-test.o
# RUN: %lld -lSystem -arch arm64 -o %t/arm64-executable %t/arm64-test.o
# RUN: %lld-watchos -lSystem -o %t/arm64-32-executable %t/arm64-32-test.o
# RUN: %lld -arch x86_64 -dylib -o %t/x86-64-dylib %t/x86-64-test.o
## NOTE: recent versions of ld64 don't emit LIB64 for x86-64-executable, maybe we should follow suit
# RUN: llvm-objdump --macho --private-header %t/x86-64-executable | FileCheck %s --check-prefix=EXEC -DCPU=X86_64 -DSUBTYPE=ALL -DCAPS=LIB64
# RUN: llvm-objdump --macho --private-header %t/arm64-executable | FileCheck %s --check-prefix=EXEC -DCPU=ARM64 -DSUBTYPE=ALL -DCAPS=0x00
# RUN: llvm-objdump --macho --private-header %t/arm64-32-executable | FileCheck %s --check-prefix=EXEC -DCPU=ARM64_32 -DSUBTYPE=V8 -DCAPS=0x00
# RUN: llvm-objdump --macho --private-header %t/x86-64-dylib | FileCheck %s --check-prefix=DYLIB -DCPU=X86_64 -DSUBTYPE=ALL -DCAPS=0x00
# EXEC: magic cputype cpusubtype caps filetype {{.*}} flags
# EXEC-NEXT: MH_MAGIC{{(_64)?}} [[CPU]] [[SUBTYPE]] [[CAPS]] EXECUTE {{.*}} NOUNDEFS DYLDLINK TWOLEVEL PIE{{$}}
# DYLIB: magic cputype cpusubtype caps filetype {{.*}} flags
# DYLIB-NEXT: MH_MAGIC_64{{(_64)?}} [[CPU]] [[SUBTYPE]] [[CAPS]] DYLIB {{.*}} NOUNDEFS DYLDLINK TWOLEVEL NO_REEXPORTED_DYLIBS{{$}}
.globl _main
_main: