mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
[lld-macho] Switch default to new Darwin backend
The new Darwin backend for LLD is now able to link reasonably large real-world programs on x86_64. For instance, we have achieved self-hosting for the X86_64 target, where all LLD tests pass when building lld with itself on macOS. As such, we would like to make it the default back-end. The new port is now named `ld64.lld`, and the old port remains accessible as `ld64.lld.darwinold` This [annoucement email][1] has some context. (But note that, unlike what the email says, we are no longer doing this as part of the LLVM 12 branch cut -- instead we will go into LLVM 13.) Numerous mechanical test changes were required to make this change; in the interest of creating something that's reviewable on Phabricator, I've split out the boring changes into a separate diff (D95905). I plan to merge its contents with those in this diff before landing. (@gkm made the original draft of this diff, and he has agreed to let me take over.) [1]: https://lists.llvm.org/pipermail/llvm-dev/2021-January/147665.html Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D95204
This commit is contained in:
parent
f083f652c3
commit
415c0cd698
@ -620,11 +620,11 @@ std::string ToolChain::GetLinkerPath(bool *LinkerIsLLD,
|
||||
|
||||
std::string LinkerPath(GetProgramPath(LinkerName.c_str()));
|
||||
if (llvm::sys::fs::can_execute(LinkerPath)) {
|
||||
// FIXME: Remove lld.darwinnew here once it's the only MachO lld.
|
||||
// FIXME: Remove LinkerIsLLDDarwinNew once there's only one MachO lld.
|
||||
if (LinkerIsLLD)
|
||||
*LinkerIsLLD = UseLinker == "lld" || UseLinker == "lld.darwinnew";
|
||||
*LinkerIsLLD = UseLinker == "lld" || UseLinker == "lld.darwinold";
|
||||
if (LinkerIsLLDDarwinNew)
|
||||
*LinkerIsLLDDarwinNew = UseLinker == "lld.darwinnew";
|
||||
*LinkerIsLLDDarwinNew = UseLinker == "lld";
|
||||
return LinkerPath;
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
// With -fuse-ld=lld, -demangle is always passed to the linker on Darwin.
|
||||
// REQUIRES: shell
|
||||
|
||||
// FIXME: Remove this test case when we remove the lld.darwinold backend.
|
||||
// RUN: %clang --target=x86_64-apple-darwin -### \
|
||||
// RUN: -fuse-ld=lld.darwinold -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
|
||||
// RUN: | FileCheck %s
|
||||
|
||||
// RUN: %clang --target=x86_64-apple-darwin -### \
|
||||
// RUN: -fuse-ld=lld -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
|
||||
// RUN: | FileCheck %s
|
||||
// FIXME: Remove ld.darwinnew once it's the default (and only) mach-o lld.
|
||||
// RUN: %clang --target=x86_64-apple-darwin -### \
|
||||
// RUN: -fuse-ld=lld.darwinnew -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
|
||||
// RUN: | FileCheck %s
|
||||
|
||||
// CHECK: "-demangle"
|
||||
|
@ -1,6 +1,6 @@
|
||||
// RUN: touch %t.o
|
||||
|
||||
// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld= \
|
||||
// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld=lld.darwinold \
|
||||
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
|
||||
// RUN: -### %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LINKER-OLD %s
|
||||
@ -12,7 +12,7 @@
|
||||
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=520 \
|
||||
// RUN: -### %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LINKER-NEW %s
|
||||
// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld=lld.darwinnew \
|
||||
// RUN: %clang -target arm64-apple-ios12.3 -fuse-ld=lld \
|
||||
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
|
||||
// RUN: -### %t.o -B%S/Inputs/lld 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LINKER-NEW %s
|
||||
@ -20,7 +20,7 @@
|
||||
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=520 \
|
||||
// RUN: -### %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=SIMUL %s
|
||||
// RUN: %clang -target x86_64-apple-ios13-simulator -fuse-ld=lld.darwinnew \
|
||||
// RUN: %clang -target x86_64-apple-ios13-simulator -fuse-ld=lld \
|
||||
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
|
||||
// RUN: -### %t.o -B%S/Inputs/lld 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=SIMUL %s
|
||||
|
@ -1,10 +1,10 @@
|
||||
// RUN: touch %t.o
|
||||
|
||||
// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld= \
|
||||
// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld=lld.darwinold \
|
||||
// RUN: -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=0 \
|
||||
// RUN: -### %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LINKER-OLD %s
|
||||
// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld=lld.darwinnew \
|
||||
// RUN: %clang -target x86_64-apple-macos10.13 -fuse-ld=lld \
|
||||
// RUN: -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=0 \
|
||||
// RUN: -### %t.o -B%S/Inputs/lld 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LINKER-NEW %s
|
||||
@ -21,7 +21,7 @@
|
||||
// RUN: -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=400 \
|
||||
// RUN: -### %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=ARM64_OLD %s
|
||||
// RUN: %clang -target arm64-apple-macos10.13 -fuse-ld=lld.darwinnew \
|
||||
// RUN: %clang -target arm64-apple-macos10.13 -fuse-ld=lld \
|
||||
// RUN: -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=400 \
|
||||
// RUN: -### %t.o -B%S/Inputs/lld 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=ARM64_NEW %s
|
||||
|
@ -1,6 +1,6 @@
|
||||
// RUN: touch %t.o
|
||||
|
||||
// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld= \
|
||||
// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld=lld.darwinold \
|
||||
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
|
||||
// RUN: -### %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LINKER-OLD %s
|
||||
@ -8,7 +8,7 @@
|
||||
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=400 \
|
||||
// RUN: -### %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LINKER-OLD %s
|
||||
// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld=lld.darwinnew \
|
||||
// RUN: %clang -target arm64-apple-tvos12.3 -fuse-ld=lld \
|
||||
// RUN: -isysroot %S/Inputs/iPhoneOS13.0.sdk -mlinker-version=0 \
|
||||
// RUN: -### %t.o -B%S/Inputs/lld 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LINKER-NEW %s
|
||||
|
@ -1,6 +1,6 @@
|
||||
// RUN: touch %t.o
|
||||
|
||||
// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld= \
|
||||
// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld=lld.darwinold \
|
||||
// RUN: -isysroot %S/Inputs/WatchOS6.0.sdk -mlinker-version=0 \
|
||||
// RUN: -### %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LINKER-OLD %s
|
||||
@ -8,7 +8,7 @@
|
||||
// RUN: -isysroot %S/Inputs/WatchOS6.0.sdk -mlinker-version=400 \
|
||||
// RUN: -### %t.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LINKER-OLD %s
|
||||
// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld=lld.darwinnew \
|
||||
// RUN: %clang -target arm64_32-apple-watchos5.2 -fuse-ld=lld \
|
||||
// RUN: -isysroot %S/Inputs/WatchOS6.0.sdk -mlinker-version=0 \
|
||||
// RUN: -### %t.o -B%S/Inputs/lld 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LINKER-NEW %s
|
||||
|
@ -6,7 +6,7 @@
|
||||
# RUN: mkdir -p %t
|
||||
#
|
||||
# RUN: llvm-mc -filetype obj -triple x86_64-apple-ios %s -o %t/test.o
|
||||
# RUN: not lld -flavor darwinnew -o %t/test -syslibroot %S/../Inputs/iPhoneSimulator.sdk -lSystem %t/test.o 2>&1 | FileCheck %s
|
||||
# RUN: not ld64.lld -o %t/test -syslibroot %S/../Inputs/iPhoneSimulator.sdk -lSystem %t/test.o 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK-DAG: error: undefined symbol: __cache_handle_memory_pressure_event
|
||||
# CHECK-DAG: error: undefined symbol: _from_non_reexported_tapi_dylib
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
import os
|
||||
|
||||
lld = ('lld -flavor darwinnew -syslibroot ' +
|
||||
lld = ('ld64.lld -syslibroot ' +
|
||||
os.path.join(config.test_source_root, "MachO", "Inputs", "MacOSX.sdk"))
|
||||
config.substitutions.append(('%lld', lld + ' -fatal_warnings'))
|
||||
config.substitutions.append(('%no_fatal_warnings_lld', lld))
|
||||
|
@ -3,7 +3,7 @@ REQUIRES: darwin
|
||||
|
||||
RUN: mkdir -p %t1 %t2
|
||||
|
||||
RUN: lld -flavor darwinnew -arch x86_64 -v -L%t1 -F%t2 2>&1 | FileCheck -DLDIR=%t1 -DFDIR=%t2 %s
|
||||
RUN: ld64.lld -arch x86_64 -v -L%t1 -F%t2 2>&1 | FileCheck -DLDIR=%t1 -DFDIR=%t2 %s
|
||||
CHECK: Library search paths:
|
||||
CHECK-NEXT: [[LDIR]]
|
||||
CHECK-NEXT: /usr/lib
|
||||
@ -13,7 +13,7 @@ CHECK-NEXT: [[FDIR]]
|
||||
CHECK-NEXT: /Library/Frameworks
|
||||
CHECK-NEXT: /System/Library/Frameworks
|
||||
|
||||
RUN: lld -flavor darwinnew -arch x86_64 -v -L%t1 -F%t2 -Z 2>&1 | FileCheck -DLDIR=%t1 -DFDIR=%t2 --check-prefix=CHECK_Z %s
|
||||
RUN: ld64.lld -arch x86_64 -v -L%t1 -F%t2 -Z 2>&1 | FileCheck -DLDIR=%t1 -DFDIR=%t2 --check-prefix=CHECK_Z %s
|
||||
CHECK_Z: Library search paths:
|
||||
CHECK_Z-NEXT: [[LDIR]]
|
||||
CHECK_Z-NEXT: Framework search paths:
|
||||
|
@ -1,56 +1,56 @@
|
||||
# Ensure that a nonexistent path is ignored with a syslibroot
|
||||
|
||||
RUN: lld -flavor darwinnew -v -syslibroot /var/empty | FileCheck %s -check-prefix CHECK-NONEXISTENT-SYSLIBROOT
|
||||
RUN: ld64.lld -v -syslibroot /var/empty | FileCheck %s -check-prefix CHECK-NONEXISTENT-SYSLIBROOT
|
||||
|
||||
CHECK-NONEXISTENT-SYSLIBROOT: Library search paths:
|
||||
CHECK-NONEXISTENT-SYSLIBROOT-NEXT: Framework search paths:
|
||||
|
||||
RUN: mkdir -p %t/usr/lib
|
||||
RUN: lld -flavor darwinnew -v -syslibroot %t 2>&1 | FileCheck %s -check-prefix CHECK-SYSLIBROOT -DROOT=%t
|
||||
RUN: ld64.lld -v -syslibroot %t 2>&1 | FileCheck %s -check-prefix CHECK-SYSLIBROOT -DROOT=%t
|
||||
|
||||
CHECK-SYSLIBROOT-NOT: directory not found{{.*}}usr/local/lib
|
||||
CHECK-SYSLIBROOT: Library search paths:
|
||||
CHECK-SYSLIBROOT-NEXT: [[ROOT]]/usr/lib
|
||||
|
||||
RUN: mkdir -p %t/Library/libxml2-development
|
||||
RUN: lld -flavor darwinnew -v -syslibroot %t -L /Library/libxml2-development | FileCheck %s -check-prefix CHECK-ABSOLUTE-PATH-REROOTED -DROOT=%t
|
||||
RUN: ld64.lld -v -syslibroot %t -L /Library/libxml2-development | FileCheck %s -check-prefix CHECK-ABSOLUTE-PATH-REROOTED -DROOT=%t
|
||||
|
||||
CHECK-ABSOLUTE-PATH-REROOTED: Library search paths:
|
||||
CHECK-ABSOLUTE-PATH-REROOTED: [[ROOT]]/Library/libxml2-development
|
||||
CHECK-ABSOLUTE-PATH-REROOTED: [[ROOT]]/usr/lib
|
||||
|
||||
RUN: lld -flavor darwinnew -v -syslibroot %t -L %t/Library/libxml2-development | FileCheck %s -check-prefix CHECK-PATH-WITHOUT-REROOT -DPATH=%t/Library/libxml2-development
|
||||
RUN: ld64.lld -v -syslibroot %t -L %t/Library/libxml2-development | FileCheck %s -check-prefix CHECK-PATH-WITHOUT-REROOT -DPATH=%t/Library/libxml2-development
|
||||
CHECK-PATH-WITHOUT-REROOT: Library search paths:
|
||||
CHECK-PATH-WITHOUT-REROOT-NEXT: [[PATH]]
|
||||
|
||||
RUN: mkdir -p %t.2/usr/lib
|
||||
RUN: lld -flavor darwinnew -v -syslibroot %t -syslibroot %t.2 | FileCheck %s -check-prefix CHECK-SYSLIBROOT-MATRIX -DROOT=%t
|
||||
RUN: ld64.lld -v -syslibroot %t -syslibroot %t.2 | FileCheck %s -check-prefix CHECK-SYSLIBROOT-MATRIX -DROOT=%t
|
||||
|
||||
CHECK-SYSLIBROOT-MATRIX: Library search paths:
|
||||
CHECK-SYSLIBROOT-MATRIX: [[ROOT]]/usr/lib
|
||||
CHECK-SYSLIBROOT-MATRIX: [[ROOT]].2/usr/lib
|
||||
|
||||
RUN: lld -flavor darwinnew -v -syslibroot %t -syslibroot %t.2 -syslibroot / | FileCheck %s -check-prefix CHECK-SYSLIBROOT-IGNORED -DROOT=%t
|
||||
RUN: ld64.lld -v -syslibroot %t -syslibroot %t.2 -syslibroot / | FileCheck %s -check-prefix CHECK-SYSLIBROOT-IGNORED -DROOT=%t
|
||||
|
||||
CHECK-SYSLIBROOT-IGNORED: Library search paths:
|
||||
CHECK-SYSLIBROOT-IGNORED-NOT: [[ROOT]]/usr/lib
|
||||
CHECK-SYSLIBROOT-IGNORED-NOT: [[ROOT]].2/usr/lib
|
||||
|
||||
RUN: mkdir -p %t/System/Library/Frameworks
|
||||
RUN: lld -flavor darwinnew -v -syslibroot %t | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK -DROOT=%t
|
||||
RUN: ld64.lld -v -syslibroot %t | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK -DROOT=%t
|
||||
|
||||
CHECK-SYSLIBROOT-FRAMEWORK: Framework search paths:
|
||||
CHECK-SYSLIBROOT-FRAMEWORK: [[ROOT]]/System/Library/Frameworks
|
||||
|
||||
RUN: mkdir -p %t/Library/Frameworks
|
||||
RUN: mkdir -p %t.2/Library/Frameworks
|
||||
RUN: lld -flavor darwinnew -v -syslibroot %t -syslibroot %t.2 -F /Library/Frameworks | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK-MATRIX -DROOT=%t
|
||||
RUN: ld64.lld -v -syslibroot %t -syslibroot %t.2 -F /Library/Frameworks | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK-MATRIX -DROOT=%t
|
||||
|
||||
CHECK-SYSLIBROOT-FRAMEWORK-MATRIX: Framework search paths:
|
||||
CHECK-SYSLIBROOT-FRAMEWORK-MATRIX: [[ROOT]]/Library/Frameworks
|
||||
CHECK-SYSLIBROOT-FRAMEWORK-MATRIX: [[ROOT]].2/Library/Frameworks
|
||||
|
||||
RUN: lld -flavor darwinnew -v -syslibroot %t -syslibroot %t.2 -syslibroot / -F /Library/Frameworks | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK-IGNORED -DROOT=%t
|
||||
RUN: ld64.lld -v -syslibroot %t -syslibroot %t.2 -syslibroot / -F /Library/Frameworks | FileCheck %s -check-prefix CHECK-SYSLIBROOT-FRAMEWORK-IGNORED -DROOT=%t
|
||||
|
||||
CHECK-SYSLIBROOT-FRAMEWORK-IGNORED: Framework search paths:
|
||||
CHECK-SYSLIBROOT-FRAMEWORK-IGNORED-NOT: [[ROOT]]/Library/Frameworks
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -lto_library %t -print-atoms -r %s 2>&1 | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -lto_library %t -print-atoms -r %s 2>&1 | FileCheck %s
|
||||
#
|
||||
# Test that the -lto_library option does not result in an error.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch x86_64 -objc_gc %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -objc_gc %s 2>&1 | FileCheck %s
|
||||
#
|
||||
# Test that the -objc_gc is rejected.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch x86_64 -objc_gc_compaction %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -objc_gc_compaction %s 2>&1 | FileCheck %s
|
||||
#
|
||||
# Test that the -objc_gc_compaction is rejected.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch x86_64 -objc_gc_only %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -objc_gc_only %s 2>&1 | FileCheck %s
|
||||
#
|
||||
# Test that the -objc_gc_only is rejected.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: %p/Inputs/native-and-mach-o.objtxt \
|
||||
# RUN: %p/Inputs/native-and-mach-o2.objtxt -o %t && \
|
||||
# RUN: llvm-nm %t | FileCheck %s
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch x86_64 -r %s %p/Inputs/hello-world-x86_64.yaml 2>&1 | FileCheck %s
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -r %s %p/Inputs/hello-world-x86_64.yaml 2>&1 | FileCheck %s
|
||||
|
||||
--- !mach-o
|
||||
arch: x86_64
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch x86_64 -r %s 2> %t.err
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -r %s 2> %t.err
|
||||
# RUN: FileCheck %s < %t.err
|
||||
|
||||
--- !mach-o
|
||||
|
@ -1,12 +1,12 @@
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: %p/Inputs/PIE.yaml -o %t && \
|
||||
# RUN: llvm-objdump --macho --private-headers %t | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: %p/Inputs/PIE.yaml -pie -o %t\
|
||||
# RUN: && llvm-objdump --macho --private-headers %t | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: %p/Inputs/PIE.yaml -no_pie -o %t\
|
||||
# RUN: && llvm-objdump --macho --private-headers %t \
|
||||
# RUN: | FileCheck --check-prefix=CHECK_NO_PIE %s
|
||||
|
@ -1,5 +1,5 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
|
||||
# RUN: ld64.lld -arch x86_64 -r %t -o %t2 -print_atoms | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r %t -o %t2 -print_atoms | FileCheck %s
|
||||
#
|
||||
# Test that alignment info round trips through -r
|
||||
#
|
||||
|
@ -1,6 +1,6 @@
|
||||
# REQUIRES: arm
|
||||
# RUN: ld64.lld -arch armv7 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch armv7 -dylib -print_atoms %t -o %t2 \
|
||||
# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch armv7 -dylib -print_atoms %t -o %t2 \
|
||||
# RUN: %p/Inputs/armv7/libSystem.yaml -sectalign __TEXT __text 0x1000 | FileCheck %s
|
||||
# RUN: llvm-objdump -d --macho --no-symbolic-operands %t2 | FileCheck --check-prefix=CODE %s
|
||||
#
|
||||
|
@ -1,6 +1,6 @@
|
||||
# RUN: ld64.lld -arch armv7 -r -print_atoms %s \
|
||||
# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %s \
|
||||
# RUN: %p/Inputs/arm-interworking.yaml -o %t | FileCheck %s \
|
||||
# RUN: && ld64.lld -arch armv7 -dylib -print_atoms \
|
||||
# RUN: && ld64.lld.darwinold -arch armv7 -dylib -print_atoms \
|
||||
# RUN: %p/Inputs/armv7/libSystem.yaml %t -o %t2 | FileCheck %s \
|
||||
# RUN: && llvm-readobj -S --section-data %t2 | FileCheck -check-prefix=CODE %s
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch armv7 %s %p/Inputs/arm-shims.yaml \
|
||||
# RUN: ld64.lld.darwinold -arch armv7 %s %p/Inputs/arm-shims.yaml \
|
||||
# RUN: -dylib %p/Inputs/armv7/libSystem.yaml -o %t
|
||||
# RUN: llvm-readobj -S --section-data %t | FileCheck %s
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch armv7 %s -r -print_atoms -o %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch armv7 %s -r -print_atoms -o %t | FileCheck %s
|
||||
#
|
||||
# Test that assembly written without .subsections_via_symbols is parsed so
|
||||
# that atoms are non-dead-strip and there is a layout-after references
|
||||
|
@ -1,5 +1,5 @@
|
||||
# RUN: ld64.lld -arch arm64 -r %s -o %t
|
||||
# RUN: ld64.lld -arch arm64 -r %t -o %t2
|
||||
# RUN: ld64.lld.darwinold -arch arm64 -r %s -o %t
|
||||
# RUN: ld64.lld.darwinold -arch arm64 -r %t -o %t2
|
||||
# RUN: llvm-objdump -s --section="__eh_frame" %t | FileCheck %s
|
||||
# RUN: llvm-objdump -s --section="__eh_frame" %t2 | FileCheck %s
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch arm64 %s -r \
|
||||
# RUN: not ld64.lld.darwinold -arch arm64 %s -r \
|
||||
# RUN: 2> %t.err
|
||||
# RUN: FileCheck %s < %t.err
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# RUN: ld64.lld -arch arm64 -r -print_atoms %s -o %t
|
||||
# RUN: ld64.lld -arch arm64 -r -print_atoms %t -o %t2
|
||||
# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %s -o %t
|
||||
# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %t -o %t2
|
||||
# RUN: llvm-objdump --section-headers %t | FileCheck %s
|
||||
# RUN: llvm-objdump --section-headers %t2 | FileCheck %s
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch arm64 %s %p/Inputs/hello-world-arm64.yaml -o %t
|
||||
# RUN: ld64.lld.darwinold -arch arm64 %s %p/Inputs/hello-world-arm64.yaml -o %t
|
||||
# RUN: obj2yaml %t | FileCheck %s
|
||||
#
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
|
||||
#
|
||||
# Test -keep_private_externs in -r mode.
|
||||
#
|
||||
|
@ -1,11 +1,11 @@
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -no_data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -data_in_code_info -no_data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -r && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -r -data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -r -no_data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -no_data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -data_in_code_info -no_data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -r && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -r -data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -r -no_data_in_code_info && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_DATA_IN_CODE_INFO
|
||||
|
||||
--- !mach-o
|
||||
arch: x86_64
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -dylib %s -o %t %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -dylib %s -o %t %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-nm %t | FileCheck %s
|
||||
#
|
||||
# Test that a data-only dylib can be built.
|
||||
|
@ -1,8 +1,8 @@
|
||||
# RUN: ld64.lld -arch x86_64 -dead_strip -export_dynamic %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t.dylib -print_atoms | FileCheck -check-prefix=CHECK1 %s
|
||||
# RUN: ld64.lld -arch x86_64 -export_dynamic -dead_strip %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t.dylib -print_atoms | FileCheck -check-prefix=CHECK1 %s
|
||||
# RUN: ld64.lld -arch x86_64 -dead_strip %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t2.dylib -print_atoms | FileCheck -check-prefix=CHECK2 %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -dead_strip -export_dynamic %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t.dylib -print_atoms | FileCheck -check-prefix=CHECK1 %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -export_dynamic -dead_strip %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t.dylib -print_atoms | FileCheck -check-prefix=CHECK1 %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -dead_strip %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t2.dylib -print_atoms | FileCheck -check-prefix=CHECK2 %s
|
||||
|
||||
# RUN: ld64.lld -arch x86_64 -r %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t3.o
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t3.o
|
||||
# RUN: llvm-nm -m %t3.o | FileCheck -check-prefix=RELOCATABLE_SYMBOLS %s
|
||||
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -o %t %s -dylib %p/Inputs/x86_64/libSystem.yaml && \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -o %t %s -dylib %p/Inputs/x86_64/libSystem.yaml && \
|
||||
# RUN: llvm-nm -no-sort -debug-syms %t | FileCheck %s
|
||||
|
||||
# CHECK: 0000000000000000 - 00 0000 SO /Users/lhames/Projects/lld/lld-svn-tot/scratch/
|
||||
|
@ -1,10 +1,10 @@
|
||||
# REQUIRES: system-linker-mach-o
|
||||
#
|
||||
# RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: -dylib -o %t %p/Inputs/x86_64/libSystem.yaml 2> %t.err
|
||||
# RUN: FileCheck %s < %t.err
|
||||
#
|
||||
# RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: -dylib -o %t %p/Inputs/x86_64/libSystem.yaml -demangle 2> %t.err2
|
||||
# RUN: FileCheck %s --check-prefix=DCHECK < %t.err2
|
||||
#
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Test -dependency_info option
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 -test_file_usage \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -test_file_usage \
|
||||
# RUN: -dependency_info %t.info \
|
||||
# RUN: -path_exists /System/Library/Frameworks \
|
||||
# RUN: -path_exists /System/Library/Frameworks/Foo.framework/Foo \
|
||||
|
@ -1,5 +1,5 @@
|
||||
# RUN: ld64.lld -arch arm64 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
|
||||
# RUN: llvm-objdump -r -s --section="__eh_frame" --macho %t | FileCheck --check-prefix=CODE %s
|
||||
# RUN: llvm-objdump -r -s --section="__eh_frame" --macho %t2 | FileCheck --check-prefix=CODE %s
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
# RUN: ld64.lld -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml -o %t1
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml -o %t1
|
||||
# RUN: llvm-nm -m -n %t1 | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml -dead_strip -o %t2
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml -dead_strip -o %t2
|
||||
# RUN: llvm-nm -m -n %t2 | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml -dylib -o %t3
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml -dylib -o %t3
|
||||
# RUN: llvm-nm -m -n %t3 | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml -bundle -o %t4
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml -bundle -o %t4
|
||||
# RUN: llvm-nm -m -n %t4 | FileCheck %s
|
||||
#
|
||||
# Test that ___dso_handle symbol is available for executables, bundles, and dylibs
|
||||
|
@ -1,23 +1,23 @@
|
||||
# Check we accept -install_name correctly:
|
||||
# RUN: ld64.lld -arch x86_64 -install_name libwibble.dylib -dylib \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -install_name libwibble.dylib -dylib \
|
||||
# RUN: -compatibility_version 2.0 -current_version 5.3 \
|
||||
# RUN: %p/Inputs/x86_64/libSystem.yaml %s -o %t.dylib
|
||||
# RUN: llvm-objdump --private-headers %t.dylib | FileCheck %s --check-prefix=CHECK-BINARY-WRITE
|
||||
|
||||
# Check we read LC_ID_DYLIB correctly:
|
||||
# RUN: ld64.lld -arch x86_64 %p/Inputs/use-dylib-install-names.yaml \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %p/Inputs/use-dylib-install-names.yaml \
|
||||
# RUN: %p/Inputs/x86_64/libSystem.yaml %t.dylib -dylib -o %t2.dylib
|
||||
# RUN: llvm-objdump --private-headers %t2.dylib | FileCheck %s --check-prefix=CHECK-BINARY-READ
|
||||
|
||||
# Check we default the install-name to the output file:
|
||||
# RUN: ld64.lld -arch x86_64 -dylib %s -o libwibble.dylib \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -dylib %s -o libwibble.dylib \
|
||||
# RUN: -compatibility_version 2.0 -current_version 5.3 \
|
||||
# RUN: %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-objdump --private-headers libwibble.dylib | FileCheck %s --check-prefix=CHECK-BINARY-WRITE
|
||||
# RUN: rm -f libwibble.dylib
|
||||
|
||||
# Check -single_module does nothing
|
||||
# RUN: ld64.lld -arch x86_64 -dylib %s -install_name libwibble.dylib \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -dylib %s -install_name libwibble.dylib \
|
||||
# RUN: -compatibility_version 2.0 -current_version 5.3 \
|
||||
# RUN: -single_module -o %t2.dylib %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-objdump --private-headers %t2.dylib | FileCheck %s --check-prefix=CHECK-BINARY-WRITE
|
||||
|
@ -1,5 +1,5 @@
|
||||
# RUN: ld64.lld -arch arm64 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch arm64 -r -print_atoms %t -o %t2 | FileCheck %s
|
||||
# RUN: llvm-objdump -r -s --section="__eh_frame" --macho %t | FileCheck --check-prefix=CODE %s
|
||||
# RUN: llvm-objdump -r -s --section="__eh_frame" --macho %t2 | FileCheck --check-prefix=CODE %s
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r %s -o %t
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t
|
||||
#
|
||||
# Test that writing empty mach-o sections does not segfault the linker.
|
||||
#
|
||||
|
@ -1,5 +1,5 @@
|
||||
# RUN: ld64.lld -arch i386 -macosx_version_min 10.8 %s %p/Inputs/hello-world-x86.yaml -o %t && llvm-nm -m %t | FileCheck %s
|
||||
# RUN: not ld64.lld -arch i386 -ios_simulator_version_min 5.0 %s %p/Inputs/hello-world-x86.yaml -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
|
||||
# RUN: ld64.lld.darwinold -arch i386 -macosx_version_min 10.8 %s %p/Inputs/hello-world-x86.yaml -o %t && llvm-nm -m %t | FileCheck %s
|
||||
# RUN: not ld64.lld.darwinold -arch i386 -ios_simulator_version_min 5.0 %s %p/Inputs/hello-world-x86.yaml -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
|
||||
#
|
||||
# Test that i386 can link with a macos version but gives an error with a simulator version.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 %s -o %t -e start %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s -o %t -e start %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-readobj --sections %t | FileCheck %s
|
||||
|
||||
# Make sure data gets put at offset
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 %s -o %t %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s -o %t %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-readobj --sections --section-data %t | FileCheck %s
|
||||
|
||||
--- !native
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 \
|
||||
# RUN: %s %p/Inputs/x86_64/libSystem.yaml -o %t && \
|
||||
# RUN: llvm-objdump --macho --exports-trie %t | FileCheck %s
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch i386 %s %p/Inputs/hello-world-x86.yaml -o %t
|
||||
# RUN: ld64.lld.darwinold -arch i386 %s %p/Inputs/hello-world-x86.yaml -o %t
|
||||
# RUN: llvm-objdump --macho --exports-trie %t | FileCheck %s
|
||||
#
|
||||
# Test that the export trie is emitted in order.
|
||||
|
@ -1,19 +1,19 @@
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 -dylib \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 -dylib \
|
||||
# RUN: %s %p/Inputs/x86_64/libSystem.yaml -o %t \
|
||||
# RUN: -exported_symbols_list %p/Inputs/exported_symbols_list.exp && \
|
||||
# RUN: llvm-nm -m %t | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 -dylib \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 -dylib \
|
||||
# RUN: %s %p/Inputs/x86_64/libSystem.yaml -o %t2 \
|
||||
# RUN: -exported_symbol _foo -exported_symbol _b && \
|
||||
# RUN: llvm-nm -m %t2 | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 -dylib \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 -dylib \
|
||||
# RUN: %s %p/Inputs/x86_64/libSystem.yaml -o %t3 \
|
||||
# RUN: -unexported_symbol _bar -unexported_symbol _a && \
|
||||
# RUN: llvm-nm -m %t3 | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 -dylib \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 -dylib \
|
||||
# RUN: %s %p/Inputs/x86_64/libSystem.yaml -dead_strip -o %t \
|
||||
# RUN: -exported_symbols_list %p/Inputs/exported_symbols_list.exp && \
|
||||
# RUN: llvm-nm -m %t | FileCheck -check-prefix=CHECK_DEAD %s
|
||||
|
@ -1,11 +1,11 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r %s -o %t -exported_symbol _bar \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t -exported_symbol _bar \
|
||||
# RUN: && llvm-nm -m %t | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 -r %s -o %t2 -keep_private_externs \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t2 -keep_private_externs \
|
||||
# RUN: -exported_symbol _bar && \
|
||||
# RUN: llvm-nm -m %t2 | FileCheck -check-prefix=CHECK_KPE %s
|
||||
#
|
||||
# RUN: not ld64.lld -arch x86_64 -r %s -o %t3 \
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -r %s -o %t3 \
|
||||
# RUN: -exported_symbol _foo 2> %t4
|
||||
|
||||
# Test -exported_symbols_list properly changes visibility in -r mode.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.8 -dylib \
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 -dylib \
|
||||
# RUN: %s %p/Inputs/x86_64/libSystem.yaml -o %t -exported_symbol _foobar 2> %t2
|
||||
#
|
||||
# Test -exported_symbol fails if exported symbol not found.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t \
|
||||
# RUN: -L %p/Inputs -lfoo %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-nm -m -n %t | FileCheck %s
|
||||
#
|
||||
|
@ -1,11 +1,11 @@
|
||||
# RUN: ld64.lld -test_file_usage \
|
||||
# RUN: ld64.lld.darwinold -test_file_usage \
|
||||
# RUN: -filelist %p/Inputs/full.filelist \
|
||||
# RUN: -path_exists /foo/bar/a.o \
|
||||
# RUN: -path_exists /foo/bar/b.o \
|
||||
# RUN: -path_exists /foo/x.a \
|
||||
# RUN: 2>&1 | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -test_file_usage -t \
|
||||
# RUN: ld64.lld.darwinold -test_file_usage -t \
|
||||
# RUN: -filelist %p/Inputs/partial.filelist,/foo \
|
||||
# RUN: -path_exists /foo/bar/a.o \
|
||||
# RUN: -path_exists /foo/bar/b.o \
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch x86_64 -macosx_version_min 10.9 -flat_namespace -undefined error %s -o %t %p/Inputs/x86_64/libSystem.yaml 2>&1 | FileCheck %s
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.9 -flat_namespace -undefined error %s -o %t %p/Inputs/x86_64/libSystem.yaml 2>&1 | FileCheck %s
|
||||
|
||||
--- !native
|
||||
defined-atoms:
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.9 -flat_namespace -undefined suppress %s -o %t %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.9 -flat_namespace -undefined suppress %s -o %t %p/Inputs/x86_64/libSystem.yaml
|
||||
#
|
||||
# Sanity check '-flat_namespace -undefined suppress'.
|
||||
# This should pass without error, even though '_bar' is undefined.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# RUN: ld64.lld -arch x86_64 -dylib %p/Inputs/bar.yaml \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -dylib %p/Inputs/bar.yaml \
|
||||
# RUN: -install_name /usr/lib/libbar.dylib %p/Inputs/x86_64/libSystem.yaml -o %t1.dylib
|
||||
# RUN: ld64.lld -arch x86_64 -dylib %s -all_load %t1.dylib \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -dylib %s -all_load %t1.dylib \
|
||||
# RUN: -install_name /usr/lib/libfoo.dylib %p/Inputs/x86_64/libSystem.yaml -o %t
|
||||
# RUN: llvm-nm -m %t | FileCheck %s
|
||||
#
|
||||
|
@ -1,8 +1,8 @@
|
||||
# RUN: ld64.lld -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml \
|
||||
# RUN: %p/Inputs/libfoo.a %p/Inputs/libbar.a -o %t1
|
||||
# RUN: llvm-nm -m -n %t1 | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml \
|
||||
# RUN: -force_load %p/Inputs/libfoo.a %p/Inputs/libbar.a -o %t2
|
||||
# RUN: llvm-nm -m -n %t2 | FileCheck --check-prefix=CHECKF %s
|
||||
#
|
||||
|
@ -5,7 +5,7 @@
|
||||
# /opt/Frameworks should not be found in SDK
|
||||
# /System/Library/Frameworks is implicit and should be in SDK
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 -r -test_file_usage -v \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r -test_file_usage -v \
|
||||
# RUN: -path_exists myFrameworks \
|
||||
# RUN: -path_exists myFrameworks/my.framework/my \
|
||||
# RUN: -path_exists /opt/Frameworks \
|
||||
|
@ -1,8 +1,8 @@
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -function_starts && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -no_function_starts && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -function_starts -no_function_starts && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -function_starts && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -no_function_starts && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static -function_starts -no_function_starts && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s -o %t -dylib %p/Inputs/x86_64/libSystem.yaml -static && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_FUNCTION_STARTS
|
||||
|
||||
--- !mach-o
|
||||
arch: x86_64
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch arm64 %s \
|
||||
# RUN: ld64.lld.darwinold -arch arm64 %s \
|
||||
# RUN: -dylib %p/Inputs/arm64/libSystem.yaml -o %t
|
||||
# RUN: llvm-objdump --section-headers %t | FileCheck %s
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 %s %p/Inputs/got-order.yaml \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/got-order.yaml \
|
||||
# RUN: %p/Inputs/got-order2.yaml -o %t %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-objdump --macho --bind %t | FileCheck %s
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch arm64 %s %p/Inputs/hello-world-arm64.yaml -o %t
|
||||
# RUN: ld64.lld.darwinold -arch arm64 %s %p/Inputs/hello-world-arm64.yaml -o %t
|
||||
# RUN: llvm-nm -m -n %t | FileCheck %s
|
||||
# RUN: llvm-objdump --private-headers %t | FileCheck %s --check-prefix=CHECK-PRIVATE-HEADER
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch armv6 %s %p/Inputs/hello-world-armv6.yaml -o %t
|
||||
# RUN: ld64.lld.darwinold -arch armv6 %s %p/Inputs/hello-world-armv6.yaml -o %t
|
||||
# RUN: llvm-nm -m %t | FileCheck %s
|
||||
#
|
||||
# Test that armv6 (arm) hello-world can be linked into a mach-o executable
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch armv7 %s %p/Inputs/hello-world-armv7.yaml -o %t
|
||||
# RUN: ld64.lld.darwinold -arch armv7 %s %p/Inputs/hello-world-armv7.yaml -o %t
|
||||
# RUN: llvm-nm -m -n %t | FileCheck %s
|
||||
#
|
||||
# Test that armv7 (thumb) hello-world can be linked into a mach-o executable
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch i386 %s %p/Inputs/hello-world-x86.yaml -o %t
|
||||
# RUN: ld64.lld.darwinold -arch i386 %s %p/Inputs/hello-world-x86.yaml -o %t
|
||||
# RUN: llvm-nm -m %t | FileCheck %s
|
||||
#
|
||||
# Test that i386 hello-world can be linked into a mach-o executable
|
||||
|
@ -1,8 +1,8 @@
|
||||
# RUN: ld64.lld -arch x86_64 %s %p/Inputs/hello-world-x86_64.yaml \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/hello-world-x86_64.yaml \
|
||||
# RUN: -o %t
|
||||
# RUN: llvm-nm -m -n %t | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 %s %p/Inputs/hello-world-x86_64.yaml \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/hello-world-x86_64.yaml \
|
||||
# RUN: -dead_strip -o %t2
|
||||
# RUN: llvm-nm -m -n %t2 | FileCheck %s
|
||||
#
|
||||
|
@ -1,10 +1,10 @@
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.9 %s -o %t -image_base 31415926000 %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.9 %s -o %t -image_base 31415926000 %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-readobj --macho-segment %t | FileCheck %s
|
||||
# RUN: not ld64.lld -arch x86_64 -image_base 0x31415926530 %s >/dev/null 2> %t
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -image_base 0x31415926530 %s >/dev/null 2> %t
|
||||
# RUN: FileCheck < %t %s --check-prefix=CHECK-ERROR-MISPAGED
|
||||
# RUN: not ld64.lld -arch x86_64 -image_base 1000 %s >/dev/null 2> %t
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -image_base 1000 %s >/dev/null 2> %t
|
||||
# RUN: FileCheck < %t %s --check-prefix=CHECK-ERROR-OVERLAP
|
||||
# RUN: not ld64.lld -arch x86_64 -image_base hithere %s >/dev/null 2> %t
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -image_base hithere %s >/dev/null 2> %t
|
||||
# RUN: FileCheck < %t %s --check-prefix=CHECK-ERROR-NOTHEX
|
||||
|
||||
--- !native
|
||||
|
@ -1,5 +1,5 @@
|
||||
# RUN: ld64.lld -arch i386 -macosx_version_min 10.8 %s -r -o %t \
|
||||
# RUN: && ld64.lld -r %t -o %t2 -print_atoms | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch i386 -macosx_version_min 10.8 %s -r -o %t \
|
||||
# RUN: && ld64.lld.darwinold -r %t -o %t2 -print_atoms | FileCheck %s
|
||||
#
|
||||
# Test linker can detect architecture without -arch option.
|
||||
#
|
||||
|
@ -1,8 +1,8 @@
|
||||
# RUN: ld64.lld -arch x86_64 %s %p/Inputs/interposing-section.yaml \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/interposing-section.yaml \
|
||||
# RUN: -dylib -o %t %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-objdump --private-headers %t | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 %s -r -o %t1
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s -r -o %t1
|
||||
# RUN: llvm-objdump --private-headers %t1 | FileCheck %s
|
||||
#
|
||||
# Test that interposing section is preserved by linker.
|
||||
|
@ -1,7 +1,7 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r %s -o %t \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t \
|
||||
# RUN: && llvm-nm -m %t | FileCheck %s
|
||||
#
|
||||
# RUN: ld64.lld -arch x86_64 -r %s -o %t2 -keep_private_externs \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r %s -o %t2 -keep_private_externs \
|
||||
# RUN: && llvm-nm -m %t2 | FileCheck -check-prefix=CHECK_KPE %s
|
||||
#
|
||||
# Test -keep_private_externs in -r mode.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# REQUIRES: x86
|
||||
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.8 %s \
|
||||
# RUN: %p/Inputs/lazy-bind-x86_64.yaml %p/Inputs/lazy-bind-x86_64-2.yaml \
|
||||
# RUN: %p/Inputs/lazy-bind-x86_64-3.yaml -o %t \
|
||||
# RUN: %p/Inputs/x86_64/libSystem.yaml
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r -o %t %s && llvm-objdump --private-headers %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r -o %t %s && llvm-objdump --private-headers %t | FileCheck %s
|
||||
|
||||
# CHECK: filesize 19
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 %s -syslibroot %p/Inputs/lib-search-paths -lmyshared -lmystatic -lfile.o -r -print_atoms 2>&1 | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s -syslibroot %p/Inputs/lib-search-paths -lmyshared -lmystatic -lfile.o -r -print_atoms 2>&1 | FileCheck %s
|
||||
|
||||
--- !native
|
||||
undefined-atoms:
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 %p/Inputs/libfoo.a %s -o %t \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %p/Inputs/libfoo.a %s -o %t \
|
||||
# RUN: %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-nm -m -n %t | FileCheck %s
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 %p/Inputs/libfoo.a %p/Inputs/libbar.a \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %p/Inputs/libfoo.a %p/Inputs/libbar.a \
|
||||
# RUN: %s -o %t %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-nm -m -n %t | FileCheck %s
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -test_file_usage -v \
|
||||
# RUN: not ld64.lld.darwinold -test_file_usage -v \
|
||||
# RUN: -path_exists /usr/lib \
|
||||
# RUN: -path_exists /Applications/MySDK/usr/local/lib \
|
||||
# RUN: -path_exists /Applications/MySDK/usr/lib \
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -test_file_usage -v \
|
||||
# RUN: ld64.lld.darwinold -test_file_usage -v \
|
||||
# RUN: -path_exists /usr/lib \
|
||||
# RUN: -path_exists /Applications/MyFirstSDK/usr/local/lib \
|
||||
# RUN: -path_exists /Applications/MySecondSDK/usr/local/lib \
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -test_file_usage -v \
|
||||
# RUN: ld64.lld.darwinold -test_file_usage -v \
|
||||
# RUN: -path_exists /usr/lib \
|
||||
# RUN: -path_exists /Applications/MySDK/usr/local/lib \
|
||||
# RUN: -path_exists /Applications/MySDK/usr/local/lib/libSystem.a \
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r -test_file_usage -v \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r -test_file_usage -v \
|
||||
# RUN: -path_exists /usr/lib \
|
||||
# RUN: -path_exists /usr/local/lib \
|
||||
# RUN: -path_exists /usr/lib/libSystem.dylib \
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r -test_file_usage -v \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r -test_file_usage -v \
|
||||
# RUN: -path_exists hasFoo \
|
||||
# RUN: -path_exists hasFoo/libFoo.dylib \
|
||||
# RUN: -path_exists /hasBar \
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r -test_file_usage -v \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r -test_file_usage -v \
|
||||
# RUN: -path_exists /usr/lib \
|
||||
# RUN: -path_exists /usr/local/lib \
|
||||
# RUN: -path_exists /usr/lib/libSystem.dylib \
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 %s -o %t -dylib \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s -o %t -dylib \
|
||||
# RUN: -macosx_version_min 10.10 -sdk_version 10.10 \
|
||||
# RUN: -install_name /usr/lib/foo.dylib \
|
||||
# RUN: %p/Inputs/x86_64/libSystem.yaml && \
|
||||
|
@ -1,6 +1,6 @@
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.4 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_LIB64
|
||||
# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.5 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=LIB64
|
||||
# RUN: ld64.lld -arch x86_64 -dylib -macosx_version_min 10.5 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=DYLIB
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.4 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=NO_LIB64
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -macosx_version_min 10.5 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=LIB64
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -dylib -macosx_version_min 10.5 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s --check-prefix=DYLIB
|
||||
|
||||
--- !mach-o
|
||||
arch: x86_64
|
||||
|
@ -1,5 +1,5 @@
|
||||
# RUN: ld64.lld -arch x86_64 %s -bundle -o %t %p/Inputs/x86_64/libSystem.yaml && llvm-nm -m -n %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch x86_64 %s -bundle -dead_strip -o %t %p/Inputs/x86_64/libSystem.yaml && llvm-nm -m -n %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s -bundle -o %t %p/Inputs/x86_64/libSystem.yaml && llvm-nm -m -n %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s -bundle -dead_strip -o %t %p/Inputs/x86_64/libSystem.yaml && llvm-nm -m -n %t | FileCheck %s
|
||||
#
|
||||
# Test that __mh_bundle_header symbol is available for bundles
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 %s -dylib -o %t %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s -dylib -o %t %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-nm -m -n %t | FileCheck %s
|
||||
#
|
||||
# Test that __mh_dylib_header symbol is available for dylibs
|
||||
|
@ -1,5 +1,5 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch x86_64 -r -print_atoms %t -o %t2 | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %t -o %t2 | FileCheck %s
|
||||
|
||||
|
||||
--- !mach-o
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch x86_64 -r %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -r %s 2>&1 | FileCheck %s
|
||||
|
||||
# The file is built for the host, but the objc image info flags are for
|
||||
# the simulator.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch x86_64 -r %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -r %s 2>&1 | FileCheck %s
|
||||
|
||||
--- !mach-o
|
||||
arch: x86_64
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch x86_64 -r %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -r %s 2>&1 | FileCheck %s
|
||||
|
||||
--- !mach-o
|
||||
arch: x86_64
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch x86_64 -r %s %p/Inputs/swift-version-1.yaml 2>&1 | FileCheck %s
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -r %s %p/Inputs/swift-version-1.yaml 2>&1 | FileCheck %s
|
||||
|
||||
--- !mach-o
|
||||
arch: x86_64
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -ios_simulator_version_min 5.0 -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -ios_simulator_version_min 5.0 -arch x86_64 -r %s -o %t -print_atoms | FileCheck %s
|
||||
|
||||
# Make sure that we have an objc image info in the output. It should have
|
||||
# been generated by the objc pass.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -ios_simulator_version_min 5.0 -arch x86_64 -r %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld64.lld.darwinold -ios_simulator_version_min 5.0 -arch x86_64 -r %s 2>&1 | FileCheck %s
|
||||
|
||||
# The file is built for the simulator, but the objc image info flags are for
|
||||
# the host.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: not ld64.lld -arch x86_64 -r %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld64.lld.darwinold -arch x86_64 -r %s 2>&1 | FileCheck %s
|
||||
|
||||
--- !mach-o
|
||||
arch: x86_64
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -dylib %s -o %t \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -dylib %s -o %t \
|
||||
# RUN: -exported_symbol .objc_class_name_Foo %p/Inputs/x86_64/libSystem.yaml
|
||||
# RUN: llvm-nm -m %t | FileCheck %s
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml \
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 %s %p/Inputs/x86_64/libSystem.yaml \
|
||||
# RUN: -order_file %p/Inputs/order_file-basic.order \
|
||||
# RUN: -force_load %p/Inputs/libfoo.a -o %t
|
||||
# RUN: llvm-nm -m -n %t | FileCheck %s
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
|
||||
#
|
||||
# Test multiple labels to same address parse into aliases.
|
||||
#
|
||||
|
@ -1,5 +1,5 @@
|
||||
# RUN: ld64.lld -arch armv7 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch armv7 -r -print_atoms %t -o %t2 | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %t -o %t2 | FileCheck %s
|
||||
#
|
||||
# Test parsing of armv7 relocations.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch i386 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch i386 -r -print_atoms %s -o %t | FileCheck %s
|
||||
#
|
||||
# Test parsing of mach-o functions.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
|
||||
#
|
||||
# Test parsing of CFString constants.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch i386 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch i386 -r -print_atoms %s -o %t | FileCheck %s
|
||||
#
|
||||
# Test parsing of __LD/__compact_unwind (compact unwind) section.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
|
||||
#
|
||||
# Test parsing of __LD/__compact_unwind (compact unwind) section.
|
||||
#
|
||||
|
@ -1,6 +1,6 @@
|
||||
# RUN: ld64.lld -arch armv7 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld -arch armv7 -r -print_atoms %t -o %t2 | FileCheck %s
|
||||
# RUN: ld64.lld -arch armv7 -dylib %s -o %t3.dylib %p/Inputs/armv7/libSystem.yaml \
|
||||
# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %s -o %t | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch armv7 -r -print_atoms %t -o %t2 | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch armv7 -dylib %s -o %t3.dylib %p/Inputs/armv7/libSystem.yaml \
|
||||
# RUN: && llvm-objdump --macho --private-headers %t3.dylib | FileCheck --check-prefix=CHECK2 %s
|
||||
#
|
||||
# Test parsing LC_DATA_IN_CODE
|
||||
|
@ -1,5 +1,5 @@
|
||||
# RUN: ld64.lld -arch i386 -r -print_atoms %s -o %t | FileCheck %s \
|
||||
# RUN: && ld64.lld -arch i386 -r -print_atoms %t -o %t2 | FileCheck %s
|
||||
# RUN: ld64.lld.darwinold -arch i386 -r -print_atoms %s -o %t | FileCheck %s \
|
||||
# RUN: && ld64.lld.darwinold -arch i386 -r -print_atoms %t -o %t2 | FileCheck %s
|
||||
#
|
||||
# Test parsing LC_DATA_IN_CODE
|
||||
#
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user