diff --git a/lld/test/MachO/compact-unwind.s b/lld/test/MachO/compact-unwind.s index d1d4f23fb51e2..876268d485037 100644 --- a/lld/test/MachO/compact-unwind.s +++ b/lld/test/MachO/compact-unwind.s @@ -2,23 +2,23 @@ # RUN: rm -rf %t; split-file %s %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/my-personality.s -o %t/x86_64-my-personality.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/main.s -o %t/x86_64-main.o -# RUN: %lld -arch x86_64 -pie -lSystem -lc++ %t/x86_64-my-personality.o %t/x86_64-main.o -o %t/x86_64-personality-first +# RUN: %lld -arch x86_64 -lSystem -lc++ %t/x86_64-my-personality.o %t/x86_64-main.o -o %t/x86_64-personality-first # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/x86_64-personality-first | FileCheck %s --check-prefixes=FIRST,CHECK -D#%x,BASE=0x100000000 -# RUN: %lld -dead_strip -arch x86_64 -pie -lSystem -lc++ %t/x86_64-main.o %t/x86_64-my-personality.o -o %t/x86_64-personality-second +# RUN: %lld -dead_strip -arch x86_64 -lSystem -lc++ %t/x86_64-main.o %t/x86_64-my-personality.o -o %t/x86_64-personality-second # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/x86_64-personality-second | FileCheck %s --check-prefixes=SECOND,CHECK -D#%x,BASE=0x100000000 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin19.0.0 %t/my-personality.s -o %t/arm64-my-personality.o # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin19.0.0 %t/main.s -o %t/arm64-main.o -# RUN: %lld -arch arm64 -pie -lSystem -lc++ %t/arm64-my-personality.o %t/arm64-main.o -o %t/arm64-personality-first +# RUN: %lld -arch arm64 -lSystem -lc++ %t/arm64-my-personality.o %t/arm64-main.o -o %t/arm64-personality-first # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/arm64-personality-first | FileCheck %s --check-prefixes=FIRST,CHECK -D#%x,BASE=0x100000000 -# RUN: %lld -dead_strip -arch arm64 -pie -lSystem -lc++ %t/arm64-main.o %t/arm64-my-personality.o -o %t/arm64-personality-second +# RUN: %lld -dead_strip -arch arm64 -lSystem -lc++ %t/arm64-main.o %t/arm64-my-personality.o -o %t/arm64-personality-second # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/arm64-personality-second | FileCheck %s --check-prefixes=SECOND,CHECK -D#%x,BASE=0x100000000 # RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-watchos %t/my-personality.s -o %t/arm64-32-my-personality.o # RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-watchos %t/main.s -o %t/arm64-32-main.o -# RUN: %lld-watchos -pie -lSystem -lc++ %t/arm64-32-my-personality.o %t/arm64-32-main.o -o %t/arm64-32-personality-first +# RUN: %lld-watchos -lSystem -lc++ %t/arm64-32-my-personality.o %t/arm64-32-main.o -o %t/arm64-32-personality-first # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/arm64-32-personality-first | FileCheck %s --check-prefixes=FIRST,CHECK -D#%x,BASE=0x4000 -# RUN: %lld-watchos -dead_strip -pie -lSystem -lc++ %t/arm64-32-main.o %t/arm64-32-my-personality.o -o %t/arm64-32-personality-second +# RUN: %lld-watchos -dead_strip -lSystem -lc++ %t/arm64-32-main.o %t/arm64-32-my-personality.o -o %t/arm64-32-personality-second # RUN: llvm-objdump --macho --unwind-info --syms --indirect-symbols --rebase %t/arm64-32-personality-second | FileCheck %s --check-prefixes=SECOND,CHECK -D#%x,BASE=0x4000 # FIRST: Indirect symbols for (__DATA_CONST,__got) diff --git a/lld/test/MachO/invalid/compact-unwind-bad-reloc.s b/lld/test/MachO/invalid/compact-unwind-bad-reloc.s index 3e189dada0cae..b6b6c36ccfac2 100644 --- a/lld/test/MachO/invalid/compact-unwind-bad-reloc.s +++ b/lld/test/MachO/invalid/compact-unwind-bad-reloc.s @@ -2,8 +2,8 @@ # RUN: rm -rf %t; split-file %s %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/bad-function.s -o %t/bad-function.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/bad-personality.s -o %t/bad-personality.o -# RUN: not %lld -pie -lSystem -lc++ %t/bad-function.o -o %t 2>&1 | FileCheck %s -DFILE=%t/bad-function.o -# RUN: not %lld -pie -lSystem -lc++ %t/bad-personality.o -o %t 2>&1 | FileCheck %s -DFILE=%t/bad-personality.o +# RUN: not %lld -lSystem -lc++ %t/bad-function.o -o %t 2>&1 | FileCheck %s -DFILE=%t/bad-function.o +# RUN: not %lld -lSystem -lc++ %t/bad-personality.o -o %t 2>&1 | FileCheck %s -DFILE=%t/bad-personality.o # CHECK: error: compact unwind references address in [[FILE]]:(__data) which is not in segment __TEXT #--- bad-function.s diff --git a/lld/test/MachO/invalid/compact-unwind-personalities.s b/lld/test/MachO/invalid/compact-unwind-personalities.s index 744a4edfcb982..94ed68b60159c 100644 --- a/lld/test/MachO/invalid/compact-unwind-personalities.s +++ b/lld/test/MachO/invalid/compact-unwind-personalities.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %s -o %t.o -# RUN: not %lld -pie -lSystem -lc++ %t.o -o %t 2>&1 | FileCheck %s --check-prefix=TOO-MANY -# RUN: not %lld -pie -lSystem %t.o -o %t 2>&1 | FileCheck %s --check-prefix=UNDEF +# RUN: not %lld -lSystem -lc++ %t.o -o %t 2>&1 | FileCheck %s --check-prefix=TOO-MANY +# RUN: not %lld -lSystem %t.o -o %t 2>&1 | FileCheck %s --check-prefix=UNDEF # TOO-MANY: error: too many personalities (4) for compact unwind to encode # UNDEF: error: undefined symbol: ___gxx_personality_v0 diff --git a/lld/test/MachO/linkedit-contiguity.s b/lld/test/MachO/linkedit-contiguity.s index a67e86d247f47..cbdc1ae330099 100644 --- a/lld/test/MachO/linkedit-contiguity.s +++ b/lld/test/MachO/linkedit-contiguity.s @@ -10,7 +10,7 @@ # RUN: %lld %t/foo.o -dylib -o %t/libfoo.dylib # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o -# RUN: %lld -lSystem -pie -adhoc_codesign -o %t/test %t/libfoo.dylib %t/test.o +# RUN: %lld -lSystem -adhoc_codesign -o %t/test %t/libfoo.dylib %t/test.o # RUN: llvm-objdump --macho --all-headers %t/test | FileCheck %s diff --git a/lld/test/MachO/lto-internalize.ll b/lld/test/MachO/lto-internalize.ll index 477669375e3f8..c9bac63b730b9 100644 --- a/lld/test/MachO/lto-internalize.ll +++ b/lld/test/MachO/lto-internalize.ll @@ -8,7 +8,7 @@ ; RUN: llvm-as %t/test.s -o %t/test.o ; RUN: llvm-as %t/baz.s -o %t/baz.o ; RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/regular.s -o %t/regular.o -; RUN: %lld -pie -lSystem %t/test.o %t/baz.o %t/regular.o -o %t/test -save-temps +; RUN: %lld -lSystem %t/test.o %t/baz.o %t/regular.o -o %t/test -save-temps ; RUN: llvm-dis < %t/test.0.2.internalize.bc | FileCheck %s ; RUN: llvm-objdump --macho --syms %t/test | FileCheck %s --check-prefix=SYMTAB diff --git a/lld/test/MachO/mh-execute-header.s b/lld/test/MachO/mh-execute-header.s index 4a62b27bb8fa8..0ed7501132bd7 100644 --- a/lld/test/MachO/mh-execute-header.s +++ b/lld/test/MachO/mh-execute-header.s @@ -1,7 +1,7 @@ # REQUIRES: x86 # RUN: rm -rf %t; mkdir %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/test.o -# RUN: %lld -o %t/test.pie %t/test.o -pie +# RUN: %lld -o %t/test.pie %t/test.o # RUN: llvm-objdump --macho --syms %t/test.pie | FileCheck %s --check-prefix=PIE # RUN: %lld -o %t/test.no_pie %t/test.o -no_pie diff --git a/lld/test/MachO/mh-header-link.s b/lld/test/MachO/mh-header-link.s index 80b8f47928b5c..7683d7a434361 100644 --- a/lld/test/MachO/mh-header-link.s +++ b/lld/test/MachO/mh-header-link.s @@ -9,10 +9,10 @@ ## (but not in other types of files) # RUN: llvm-mc %t/dylib.s -triple=x86_64-apple-macos10.15 -filetype=obj -o %t/dylib.o -# RUN: %lld -pie -dylib -dead_strip %t/dylib.o -o %t/dylib.out +# RUN: %lld -dylib -dead_strip %t/dylib.o -o %t/dylib.out # RUN: llvm-objdump -m --syms %t/dylib.out | FileCheck %s --check-prefix DYLIB -# RUN: not %lld -pie -o /dev/null %t/dylib.o 2>&1 | FileCheck %s --check-prefix ERR-DYLIB +# RUN: not %lld -o /dev/null %t/dylib.o 2>&1 | FileCheck %s --check-prefix ERR-DYLIB # DYLIB: SYMBOL TABLE: # DYLIB-NEXT: {{[0-9a-f]+}} g F __TEXT,__text _main @@ -21,10 +21,10 @@ ## Test that in an executable, we can link against __mh_execute_header # RUN: llvm-mc %t/main.s -triple=x86_64-apple-macos10.15 -filetype=obj -o %t/exec.o -# RUN: %lld -pie -dead_strip -lSystem %t/exec.o -o %t/exec.out +# RUN: %lld -dead_strip -lSystem %t/exec.o -o %t/exec.out ## But it would be an error trying to reference __mh_execute_header in a dylib -# RUN: not %lld -pie -o /dev/null -dylib %t/exec.o 2>&1 | FileCheck %s --check-prefix ERR-EXEC +# RUN: not %lld -o /dev/null -dylib %t/exec.o 2>&1 | FileCheck %s --check-prefix ERR-EXEC # ERR-EXEC: error: undefined symbol: __mh_execute_header diff --git a/lld/test/MachO/stabs.s b/lld/test/MachO/stabs.s index 3538c2011793b..07dd2e77e9e01 100644 --- a/lld/test/MachO/stabs.s +++ b/lld/test/MachO/stabs.s @@ -130,7 +130,7 @@ ## Check that we don't attempt to emit rebase opcodes for the debug sections ## when building a PIE (since we have filtered the sections out). -# RUN: %lld -lSystem -pie %t/test.o %t/foo.a %t/no-debug.o -o %t/test +# RUN: %lld -lSystem %t/test.o %t/foo.a %t/no-debug.o -o %t/test # RUN: llvm-objdump --macho --rebase %t/test | FileCheck %s --check-prefix=PIE # PIE: Rebase table: # PIE-NEXT: segment section address type diff --git a/lld/test/MachO/tlv.s b/lld/test/MachO/tlv.s index 9c74ea082ba7a..f188bf7279a89 100644 --- a/lld/test/MachO/tlv.s +++ b/lld/test/MachO/tlv.s @@ -3,13 +3,13 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/regular.s -o %t/regular.o # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/tbss.s -o %t/tbss.o -# RUN: %lld -lSystem -no_pie -o %t/regular %t/regular.o -# RUN: llvm-otool -hv %t/regular | FileCheck %s --check-prefix=HEADER -# RUN: llvm-objdump -d --bind --rebase %t/regular | FileCheck %s --check-prefixes=REG,LINKEDIT -# RUN: llvm-objdump --macho --section=__DATA,__thread_vars %t/regular | \ +# RUN: %lld -lSystem -no_pie -o %t/regular-no-pie %t/regular.o +# RUN: llvm-otool -hv %t/regular-no-pie | FileCheck %s --check-prefix=HEADER +# RUN: llvm-objdump -d --bind --rebase %t/regular-no-pie | FileCheck %s --check-prefixes=REG,LINKEDIT +# RUN: llvm-objdump --macho --section=__DATA,__thread_vars %t/regular-no-pie | \ # RUN: FileCheck %s --check-prefix=REG-TLVP -# RUN: %lld -lSystem -pie %t/regular.o -o %t/regular-pie +# RUN: %lld -lSystem %t/regular.o -o %t/regular-pie # RUN: llvm-otool -hv %t/regular-pie | FileCheck %s --check-prefix=HEADER # RUN: llvm-objdump -d --bind --rebase %t/regular-pie | FileCheck %s --check-prefixes=REG,LINKEDIT # RUN: llvm-objdump --macho --section=__DATA,__thread_vars %t/regular-pie | \