summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/test/ELF/aarch64-cortex-a53-843419-cli.s2
-rw-r--r--lld/test/ELF/aarch64-cortex-a53-843419-nopatch.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-abs16.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-adr_prel_lo21.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-prel16.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-prel32.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-prel64.s2
-rw-r--r--lld/test/ELF/aarch64-hi21-error.s2
-rw-r--r--lld/test/ELF/aarch64-ldprel-lo19-invalid.s2
-rw-r--r--lld/test/ELF/aarch64-lo12-alignment.s2
-rw-r--r--lld/test/ELF/aarch64-lo21-error.s2
-rw-r--r--lld/test/ELF/aarch64-load-alignment.s2
-rw-r--r--lld/test/ELF/amdgpu-elf-flags-err.s2
-rw-r--r--lld/test/ELF/arm-bl-v6.s2
-rw-r--r--lld/test/ELF/arm-blx-v4t.s2
-rw-r--r--lld/test/ELF/arm-thumb-interwork-thunk-range.s2
-rw-r--r--lld/test/ELF/arm-thunk-section-too-large.s2
-rw-r--r--lld/test/ELF/arm-thunk-toolargesection.s2
-rw-r--r--lld/test/ELF/arm-use-r-output.s2
-rw-r--r--lld/test/ELF/cgprofile-warn.s2
-rw-r--r--lld/test/ELF/compressed-debug-conflict.s2
-rw-r--r--lld/test/ELF/conflict-debug-variable2.s2
-rw-r--r--lld/test/ELF/conflict-variable-linkage-name.s2
-rw-r--r--lld/test/ELF/conflict.s2
-rw-r--r--lld/test/ELF/copy-in-shared.s2
-rw-r--r--lld/test/ELF/copy-rel-corrupted.s2
-rw-r--r--lld/test/ELF/copy-rel-pie-error.s2
-rw-r--r--lld/test/ELF/corrupted-version-reference.s2
-rw-r--r--lld/test/ELF/defined-tls_get_addr.s2
-rw-r--r--lld/test/ELF/dynamic-reloc-in-ro.s2
-rw-r--r--lld/test/ELF/eh-frame-dyn-rel.s2
-rw-r--r--lld/test/ELF/eh-frame-multilpe-cie.s2
-rw-r--r--lld/test/ELF/eh-frame-rel.s2
-rw-r--r--lld/test/ELF/eh-frame-value-format1.s2
-rw-r--r--lld/test/ELF/eh-frame-value-format2.s2
-rw-r--r--lld/test/ELF/eh-frame-value-format3.s2
-rw-r--r--lld/test/ELF/eh-frame-value-format4.s2
-rw-r--r--lld/test/ELF/eh-frame-value-format5.s2
-rw-r--r--lld/test/ELF/eh-frame-value-format6.s2
-rw-r--r--lld/test/ELF/empty-archive.s2
-rw-r--r--lld/test/ELF/executable-undefined-protected-ignoreall.s2
-rw-r--r--lld/test/ELF/fatal-warnings.s4
-rw-r--r--lld/test/ELF/filter.s2
-rw-r--r--lld/test/ELF/gc-absolute.s2
-rw-r--r--lld/test/ELF/gdb-index-noranges.s2
-rw-r--r--lld/test/ELF/gdb-index-tls.s2
-rw-r--r--lld/test/ELF/global_offset_table.s2
-rw-r--r--lld/test/ELF/i386-debug-noabs.test2
-rw-r--r--lld/test/ELF/i386-reloc-16.s2
-rw-r--r--lld/test/ELF/i386-reloc-8.s2
-rw-r--r--lld/test/ELF/i386-reloc-range.s2
-rw-r--r--lld/test/ELF/i386-tls-got.s2
-rw-r--r--lld/test/ELF/icf-absolute.s2
-rw-r--r--lld/test/ELF/icf-c-identifier.s2
-rw-r--r--lld/test/ELF/icf-comdat.s2
-rw-r--r--lld/test/ELF/icf-different-output-sections.s2
-rw-r--r--lld/test/ELF/icf-i386.s2
-rw-r--r--lld/test/ELF/icf-many-sections.s2
-rw-r--r--lld/test/ELF/icf-merge-sec.s2
-rw-r--r--lld/test/ELF/icf-merge.s2
-rw-r--r--lld/test/ELF/icf-non-mergeable.s2
-rw-r--r--lld/test/ELF/icf-none.s2
-rw-r--r--lld/test/ELF/icf-relro.s2
-rw-r--r--lld/test/ELF/icf1.s2
-rw-r--r--lld/test/ELF/icf10.test2
-rw-r--r--lld/test/ELF/icf11.test2
-rw-r--r--lld/test/ELF/icf12.s2
-rw-r--r--lld/test/ELF/icf13.s2
-rw-r--r--lld/test/ELF/icf14.s2
-rw-r--r--lld/test/ELF/icf15.s2
-rw-r--r--lld/test/ELF/icf16.s2
-rw-r--r--lld/test/ELF/icf2.s2
-rw-r--r--lld/test/ELF/icf3.s2
-rw-r--r--lld/test/ELF/icf4.s2
-rw-r--r--lld/test/ELF/icf5.s2
-rw-r--r--lld/test/ELF/icf6.s2
-rw-r--r--lld/test/ELF/incompatible-ar-first.s2
-rw-r--r--lld/test/ELF/incompatible-section-flags.s2
-rw-r--r--lld/test/ELF/incompatible-section-types2.s2
-rw-r--r--lld/test/ELF/invalid-cie-length.s2
-rw-r--r--lld/test/ELF/invalid-cie-length2.s2
-rw-r--r--lld/test/ELF/invalid-cie-length3.s2
-rw-r--r--lld/test/ELF/invalid-cie-length4.s2
-rw-r--r--lld/test/ELF/invalid-cie-length5.s2
-rw-r--r--lld/test/ELF/invalid-cie-reference.s2
-rw-r--r--lld/test/ELF/invalid-eh-frame.s2
-rw-r--r--lld/test/ELF/invalid-eh-frame2.s2
-rw-r--r--lld/test/ELF/invalid-eh-frame3.s2
-rw-r--r--lld/test/ELF/invalid-eh-frame4.s2
-rw-r--r--lld/test/ELF/invalid-eh-frame5.s2
-rw-r--r--lld/test/ELF/invalid-eh-frame6.s2
-rw-r--r--lld/test/ELF/invalid-eh-frame7.s2
-rw-r--r--lld/test/ELF/invalid-eh-frame8.s2
-rw-r--r--lld/test/ELF/invalid-eh-frame9.s2
-rw-r--r--lld/test/ELF/invalid-relocations.test2
-rw-r--r--lld/test/ELF/invalid-undef-section-symbol.test2
-rw-r--r--lld/test/ELF/invalid/dynamic-section-size.s2
-rw-r--r--lld/test/ELF/invalid/eh-frame-hdr-no-out.s2
-rw-r--r--lld/test/ELF/invalid/executable.s2
-rw-r--r--lld/test/ELF/invalid/invalid-e_shnum.s2
-rw-r--r--lld/test/ELF/invalid/merge-invalid-size.s4
-rw-r--r--lld/test/ELF/invalid/mips-invalid-options-descriptor.s2
-rw-r--r--lld/test/ELF/invalid/section-alignment2.s2
-rw-r--r--lld/test/ELF/invalid/sht-group.s2
-rw-r--r--lld/test/ELF/invalid/symbol-index.s2
-rw-r--r--lld/test/ELF/invalid/symbol-name.s2
-rw-r--r--lld/test/ELF/invalid/tls-symbol.s2
-rw-r--r--lld/test/ELF/just-symbols-cref.s4
-rw-r--r--lld/test/ELF/just-symbols.s2
-rw-r--r--lld/test/ELF/linkerscript/assert.s4
-rw-r--r--lld/test/ELF/linkerscript/copy-rel-symbol-value-err.s2
-rw-r--r--lld/test/ELF/linkerscript/edata-etext.s2
-rw-r--r--lld/test/ELF/linkerscript/eh-frame-hdr.s2
-rw-r--r--lld/test/ELF/linkerscript/eh-frame.s2
-rw-r--r--lld/test/ELF/linkerscript/group.s2
-rw-r--r--lld/test/ELF/linkerscript/header-phdr2.s2
-rw-r--r--lld/test/ELF/linkerscript/huge-temporary-file.s2
-rw-r--r--lld/test/ELF/linkerscript/i386-sections-max-va-overflow.s2
-rw-r--r--lld/test/ELF/linkerscript/memory2.s2
-rw-r--r--lld/test/ELF/linkerscript/numbers.s6
-rw-r--r--lld/test/ELF/linkerscript/output-too-large.s2
-rw-r--r--lld/test/ELF/linkerscript/pt_gnu_eh_frame.s2
-rw-r--r--lld/test/ELF/linkerscript/searchdir.s4
-rw-r--r--lld/test/ELF/linkerscript/sections-max-va-overflow.s2
-rw-r--r--lld/test/ELF/linkerscript/segment-start.s2
-rw-r--r--lld/test/ELF/linkerscript/subalign.s2
-rw-r--r--lld/test/ELF/linkerscript/symbol-assignexpr.s2
-rw-r--r--lld/test/ELF/linkerscript/symbol-memoryexpr.s2
-rw-r--r--lld/test/ELF/linkerscript/symbol-ordering-file.s8
-rw-r--r--lld/test/ELF/llvm33-rela-outside-group.s2
-rw-r--r--lld/test/ELF/lto/data-ordering-lto.s2
-rw-r--r--lld/test/ELF/lto/symbol-ordering-lto.s2
-rw-r--r--lld/test/ELF/map-file-i686.s2
-rw-r--r--lld/test/ELF/map-gc-sections.s2
-rw-r--r--lld/test/ELF/merge-string-empty.s2
-rw-r--r--lld/test/ELF/merge-string-error.s2
-rw-r--r--lld/test/ELF/merge-string-no-null.s2
-rw-r--r--lld/test/ELF/mips-align-err.s2
-rw-r--r--lld/test/ELF/mips-gnu-hash.s4
-rw-r--r--lld/test/ELF/mips-n32-emul.s2
-rw-r--r--lld/test/ELF/mips-out-of-bounds-call16-reloc.s2
-rw-r--r--lld/test/ELF/mips-tls-64-pic-local-variable.s2
-rw-r--r--lld/test/ELF/multiple-cu.s2
-rw-r--r--lld/test/ELF/no-augmentation.s2
-rw-r--r--lld/test/ELF/no-line-parser-errors-if-empty-section.s2
-rw-r--r--lld/test/ELF/no-line-parser-errors-if-no-section.s2
-rw-r--r--lld/test/ELF/no-obj.s2
-rw-r--r--lld/test/ELF/no-symtab.s2
-rw-r--r--lld/test/ELF/no-undefined.s4
-rw-r--r--lld/test/ELF/oformat-binary.s2
-rw-r--r--lld/test/ELF/ppc64-addr16-error.s4
-rw-r--r--lld/test/ELF/pr34872.s2
-rw-r--r--lld/test/ELF/relocation-dtrace.test2
-rw-r--r--lld/test/ELF/relocation-nocopy.s2
-rw-r--r--lld/test/ELF/relocation-none-aarch64.test2
-rw-r--r--lld/test/ELF/relocation-none-i686.test2
-rw-r--r--lld/test/ELF/relocation-past-merge-end.s2
-rw-r--r--lld/test/ELF/relocation-relative-absolute.s2
-rw-r--r--lld/test/ELF/relocation-size-err.s2
-rw-r--r--lld/test/ELF/relro-script.s2
-rw-r--r--lld/test/ELF/section-align-0.test2
-rw-r--r--lld/test/ELF/section-metadata-err.s2
-rw-r--r--lld/test/ELF/section-metadata-err2.s2
-rw-r--r--lld/test/ELF/section-metadata-err3.s2
-rw-r--r--lld/test/ELF/section-symbols.test2
-rw-r--r--lld/test/ELF/sectionstart.s4
-rw-r--r--lld/test/ELF/splitstacks.s2
-rw-r--r--lld/test/ELF/symbol-ordering-file.s2
-rw-r--r--lld/test/ELF/symver-archive.s2
-rw-r--r--lld/test/ELF/tls-archive.s2
-rw-r--r--lld/test/ELF/tls-error.s2
-rw-r--r--lld/test/ELF/tls-in-archive.s2
-rw-r--r--lld/test/ELF/tls-mismatch.s2
-rw-r--r--lld/test/ELF/trace-symbols.s2
-rw-r--r--lld/test/ELF/typed-undef.s2
-rw-r--r--lld/test/ELF/undef-broken-debug.test2
-rw-r--r--lld/test/ELF/undef-shared.s2
-rw-r--r--lld/test/ELF/undef-start.s2
-rw-r--r--lld/test/ELF/unresolved-symbols.s10
-rw-r--r--lld/test/ELF/user_def_init_array_start.s2
-rw-r--r--lld/test/ELF/verneed-local.s2
-rw-r--r--lld/test/ELF/version-script-complex-wildcards.s2
-rw-r--r--lld/test/ELF/version-script-glob.s2
-rw-r--r--lld/test/ELF/version-script-missing.s2
-rw-r--r--lld/test/ELF/version-script-no-warn.s2
-rw-r--r--lld/test/ELF/version-script-no-warn2.s2
-rw-r--r--lld/test/ELF/version-script-symver.s2
-rw-r--r--lld/test/ELF/version-script.s4
-rw-r--r--lld/test/ELF/version-symbol-error.s2
-rw-r--r--lld/test/ELF/version-undef-sym.s2
-rw-r--r--lld/test/ELF/warn-backrefs.s4
-rw-r--r--lld/test/ELF/warn-unresolved-symbols-hidden.s2
-rw-r--r--lld/test/ELF/warn-unresolved-symbols.s14
-rw-r--r--lld/test/ELF/weak-undef-lazy.s2
-rw-r--r--lld/test/ELF/whole-archive-name.s2
-rw-r--r--lld/test/ELF/writable-merge.s2
-rw-r--r--lld/test/ELF/x86-64-dyn-rel-error2.s2
-rw-r--r--lld/test/ELF/x86-64-dyn-rel-error3.s2
-rw-r--r--lld/test/ELF/x86-64-reloc-16.s4
-rw-r--r--lld/test/ELF/x86-64-reloc-32-fpic.s2
-rw-r--r--lld/test/ELF/x86-64-reloc-8.s4
-rw-r--r--lld/test/ELF/x86-64-reloc-debug-overflow.s2
-rw-r--r--lld/test/ELF/x86-64-reloc-error-reporting.s2
-rw-r--r--lld/test/ELF/x86-64-reloc-error.s2
-rw-r--r--lld/test/ELF/x86-64-reloc-pc32-fpic.s2
-rw-r--r--lld/test/ELF/x86-64-reloc-range.s2
-rw-r--r--lld/test/ELF/x86-64-reloc-tpoff32-fpic.s2
-rw-r--r--lld/test/ELF/znotext-plt-relocations-protected.s2
213 files changed, 241 insertions, 241 deletions
diff --git a/lld/test/ELF/aarch64-cortex-a53-843419-cli.s b/lld/test/ELF/aarch64-cortex-a53-843419-cli.s
index 30abc8f06d2..9c1d4858b3a 100644
--- a/lld/test/ELF/aarch64-cortex-a53-843419-cli.s
+++ b/lld/test/ELF/aarch64-cortex-a53-843419-cli.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-// RUN: not ld.lld %t -fix-cortex-a53-843419 -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld %t -fix-cortex-a53-843419 -o /dev/null 2>&1 | FileCheck %s
// CHECK: --fix-cortex-a53-843419 is only supported on AArch64 targets.
.globl entry
diff --git a/lld/test/ELF/aarch64-cortex-a53-843419-nopatch.s b/lld/test/ELF/aarch64-cortex-a53-843419-nopatch.s
index 389bf450573..4f34ea26da7 100644
--- a/lld/test/ELF/aarch64-cortex-a53-843419-nopatch.s
+++ b/lld/test/ELF/aarch64-cortex-a53-843419-nopatch.s
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
-// RUN: ld.lld -fix-cortex-a53-843419 -verbose -t %t.o -o %t2 | FileCheck %s
+// 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.
// See ARM-EPM-048406 Cortex_A53_MPCore_Software_Developers_Errata_Notice.pdf
diff --git a/lld/test/ELF/aarch64-fpic-abs16.s b/lld/test/ELF/aarch64-fpic-abs16.s
index f4d8e282768..c180939b7ca 100644
--- a/lld/test/ELF/aarch64-fpic-abs16.s
+++ b/lld/test/ELF/aarch64-fpic-abs16.s
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
+// 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
// CHECK-NEXT: >>> referenced by {{.*}}.o:(.data+0x0)
diff --git a/lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s b/lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s
index 9f5608172e0..fc58e06b3db 100644
--- a/lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s
+++ b/lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: dat in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
// CHECK: >>> defined in {{.*}}.o
// CHECK: >>> referenced by {{.*}}.o:(.text+0x0)
diff --git a/lld/test/ELF/aarch64-fpic-adr_prel_lo21.s b/lld/test/ELF/aarch64-fpic-adr_prel_lo21.s
index eebb3d26bb8..4b6f43f1f22 100644
--- a/lld/test/ELF/aarch64-fpic-adr_prel_lo21.s
+++ b/lld/test/ELF/aarch64-fpic-adr_prel_lo21.s
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: relocation R_AARCH64_ADR_PREL_LO21 cannot be used against symbol dat; recompile with -fPIC
// CHECK: >>> defined in {{.*}}.o
// CHECK: >>> referenced by {{.*}}.o:(.text+0x0)
diff --git a/lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s b/lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s
index b8e50e84de5..651a32e5686 100644
--- a/lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s
+++ b/lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol dat; recompile with -fPIC
// CHECK: >>> defined in {{.*}}.o
// CHECK: >>> referenced by {{.*}}.o:(.text+0x0)
diff --git a/lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s b/lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s
index b263fe79219..b68b9f23e4c 100644
--- a/lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s
+++ b/lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: can't create dynamic relocation R_AARCH64_LDST32_ABS_LO12_NC against symbol: dat in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
// CHECK: >>> defined in {{.*}}.o
// CHECK: >>> referenced by {{.*}}.o:(.text+0x0)
diff --git a/lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s b/lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s
index 3739ab3ed27..1d5b9439f0f 100644
--- a/lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s
+++ b/lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: can't create dynamic relocation R_AARCH64_LDST64_ABS_LO12_NC against symbol: dat in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
// CHECK: >>> defined in {{.*}}.o
// CHECK: >>> referenced by {{.*}}.o:(.text+0x0)
diff --git a/lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s b/lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s
index 4354ffdc877..a3f8243a080 100644
--- a/lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s
+++ b/lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: can't create dynamic relocation R_AARCH64_LDST8_ABS_LO12_NC against symbol: dat in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
// CHECK: >>> defined in {{.*}}.o
// CHECK: >>> referenced by {{.*}}.o:(.text+0x0)
diff --git a/lld/test/ELF/aarch64-fpic-prel16.s b/lld/test/ELF/aarch64-fpic-prel16.s
index 48adb06e259..1de7f6f6337 100644
--- a/lld/test/ELF/aarch64-fpic-prel16.s
+++ b/lld/test/ELF/aarch64-fpic-prel16.s
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
+// 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 {{.*}}
// CHECK: >>> referenced by {{.*}}:(.data+0x0)
diff --git a/lld/test/ELF/aarch64-fpic-prel32.s b/lld/test/ELF/aarch64-fpic-prel32.s
index de64bd58099..0988b26a2b9 100644
--- a/lld/test/ELF/aarch64-fpic-prel32.s
+++ b/lld/test/ELF/aarch64-fpic-prel32.s
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: relocation R_AARCH64_PREL32 cannot be used against symbol foo; recompile with -fPIC
// CHECK: >>> defined in {{.*}}
// CHECK: >>> referenced by {{.*}}:(.data+0x0)
diff --git a/lld/test/ELF/aarch64-fpic-prel64.s b/lld/test/ELF/aarch64-fpic-prel64.s
index ef1fe8d8085..653f5422033 100644
--- a/lld/test/ELF/aarch64-fpic-prel64.s
+++ b/lld/test/ELF/aarch64-fpic-prel64.s
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
-// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: relocation R_AARCH64_PREL64 cannot be used against symbol foo; recompile with -fPIC
// CHECK: >>> defined in {{.*}}
// CHECK: >>> referenced by {{.*}}:(.data+0x0)
diff --git a/lld/test/ELF/aarch64-hi21-error.s b/lld/test/ELF/aarch64-hi21-error.s
index 613b3beb9b3..07f9e04953b 100644
--- a/lld/test/ELF/aarch64-hi21-error.s
+++ b/lld/test/ELF/aarch64-hi21-error.s
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %S/Inputs/abs.s -o %tabs
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %s -o %t
-// RUN: not ld.lld %tabs %t -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld %tabs %t -o /dev/null 2>&1 | FileCheck %s
.globl _start
_start:
diff --git a/lld/test/ELF/aarch64-ldprel-lo19-invalid.s b/lld/test/ELF/aarch64-ldprel-lo19-invalid.s
index 04df32e0590..cf38b2c84fd 100644
--- a/lld/test/ELF/aarch64-ldprel-lo19-invalid.s
+++ b/lld/test/ELF/aarch64-ldprel-lo19-invalid.s
@@ -1,7 +1,7 @@
# REQUIRES: aarch64
# RUN: llvm-mc -filetype=obj -triple=aarch64-linux-none %s -o %t.o
-# RUN: not ld.lld -shared %t.o -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: relocation R_AARCH64_LD_PREL_LO19 out of range: 2065536 is not in [-1048576, 1048575]
diff --git a/lld/test/ELF/aarch64-lo12-alignment.s b/lld/test/ELF/aarch64-lo12-alignment.s
index 2b30022658e..7edecd4494f 100644
--- a/lld/test/ELF/aarch64-lo12-alignment.s
+++ b/lld/test/ELF/aarch64-lo12-alignment.s
@@ -1,6 +1,6 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t
-// RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck %s
// Test derived from a typical ODR violation where a global is declared
// extern int but defined as a half or byte sized type.
diff --git a/lld/test/ELF/aarch64-lo21-error.s b/lld/test/ELF/aarch64-lo21-error.s
index a22cd27f06c..c1fb8a6fa2c 100644
--- a/lld/test/ELF/aarch64-lo21-error.s
+++ b/lld/test/ELF/aarch64-lo21-error.s
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %S/Inputs/abs.s -o %tabs
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %s -o %t
-// RUN: not ld.lld %tabs %t -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld %tabs %t -o /dev/null 2>&1 | FileCheck %s
.globl _start
_start:
diff --git a/lld/test/ELF/aarch64-load-alignment.s b/lld/test/ELF/aarch64-load-alignment.s
index 7b1129b7afa..175f1e6dad7 100644
--- a/lld/test/ELF/aarch64-load-alignment.s
+++ b/lld/test/ELF/aarch64-load-alignment.s
@@ -1,7 +1,7 @@
# REQUIRES: aarch64
# RUN: llvm-mc -filetype=obj -triple=aarch64-linux-none %s -o %t.o
-# RUN: not ld.lld -shared %t.o -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: improper alignment for relocation R_AARCH64_LD_PREL_LO19: 0x10005 is not aligned to 4 bytes
diff --git a/lld/test/ELF/amdgpu-elf-flags-err.s b/lld/test/ELF/amdgpu-elf-flags-err.s
index d02f1956663..b5619352fb0 100644
--- a/lld/test/ELF/amdgpu-elf-flags-err.s
+++ b/lld/test/ELF/amdgpu-elf-flags-err.s
@@ -1,6 +1,6 @@
# REQUIRES: amdgpu
# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx802 -filetype=obj %S/Inputs/amdgpu-kernel-0.s -o %t-0.o
# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx803 -filetype=obj %S/Inputs/amdgpu-kernel-1.s -o %t-1.o
-# RUN: not ld.lld -shared %t-0.o %t-1.o -o %t.so 2>&1 | FileCheck %s
+# RUN: not ld.lld -shared %t-0.o %t-1.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: incompatible e_flags: {{.*}}-1.o
diff --git a/lld/test/ELF/arm-bl-v6.s b/lld/test/ELF/arm-bl-v6.s
index eac33874823..c27a99e6b9e 100644
--- a/lld/test/ELF/arm-bl-v6.s
+++ b/lld/test/ELF/arm-bl-v6.s
@@ -1,6 +1,6 @@
// REQUIRES: arm
// RUN: llvm-mc -filetype=obj -triple=arm-none-linux-gnueabi %s -o %t
-// RUN: ld.lld %t -o %t2 2>&1 | FileCheck %s
+// RUN: ld.lld %t -o /dev/null 2>&1 | FileCheck %s
// On Arm v6 the range of a Thumb BL instruction is only 4 megabytes as the
// extended range encoding is not supported. The following example has a Thumb
diff --git a/lld/test/ELF/arm-blx-v4t.s b/lld/test/ELF/arm-blx-v4t.s
index 917dcc74a4e..f526b3b01f4 100644
--- a/lld/test/ELF/arm-blx-v4t.s
+++ b/lld/test/ELF/arm-blx-v4t.s
@@ -1,6 +1,6 @@
// REQUIRES: arm
// RUN: llvm-mc -filetype=obj -triple=arm-none-linux-gnueabi %s -o %t
-// RUN: ld.lld %t -o %t2 2>&1 | FileCheck %s
+// RUN: ld.lld %t -o /dev/null 2>&1 | FileCheck %s
// On Arm v4t there is no blx instruction so all interworking must go via
// a thunk. At present we don't support v4t so we give a warning for unsupported
diff --git a/lld/test/ELF/arm-thumb-interwork-thunk-range.s b/lld/test/ELF/arm-thumb-interwork-thunk-range.s
index db674f4d5f7..d59ee115992 100644
--- a/lld/test/ELF/arm-thumb-interwork-thunk-range.s
+++ b/lld/test/ELF/arm-thumb-interwork-thunk-range.s
@@ -1,6 +1,6 @@
// REQUIRES: arm
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
-// RUN: ld.lld %t.o -o %t -image-base=0x80000000
+// RUN: ld.lld %t.o -o /dev/null -image-base=0x80000000
// Test that when the thunk is at a high address we don't get confused with it
// being out of range.
diff --git a/lld/test/ELF/arm-thunk-section-too-large.s b/lld/test/ELF/arm-thunk-section-too-large.s
index 268d6c9391f..9174093380f 100644
--- a/lld/test/ELF/arm-thunk-section-too-large.s
+++ b/lld/test/ELF/arm-thunk-section-too-large.s
@@ -1,6 +1,6 @@
// REQUIRES: ARM
// RUN: llvm-mc %s -triple=armv7a-linux-gnueabihf -arm-add-build-attributes -filetype=obj -o %t.o
-// RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: InputSection too large for range extension thunk
.syntax unified
diff --git a/lld/test/ELF/arm-thunk-toolargesection.s b/lld/test/ELF/arm-thunk-toolargesection.s
index a0ad3835874..13d0ea78368 100644
--- a/lld/test/ELF/arm-thunk-toolargesection.s
+++ b/lld/test/ELF/arm-thunk-toolargesection.s
@@ -1,6 +1,6 @@
// REQUIRES: arm
// RUN: llvm-mc -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
-// RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck %s
.syntax unified
.balign 0x1000
.thumb
diff --git a/lld/test/ELF/arm-use-r-output.s b/lld/test/ELF/arm-use-r-output.s
index 918362466d3..2d235086316 100644
--- a/lld/test/ELF/arm-use-r-output.s
+++ b/lld/test/ELF/arm-use-r-output.s
@@ -1,7 +1,7 @@
// REQUIRES: arm
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
// RUN: ld.lld -r %t.o -o %t2.o
-// RUN: ld.lld -shared %t2.o -o %t.so
+// RUN: ld.lld -shared %t2.o -o /dev/null
// We used to crash using the output of -r because of the relative order of
// SHF_LINK_ORDER sections.
diff --git a/lld/test/ELF/cgprofile-warn.s b/lld/test/ELF/cgprofile-warn.s
index 2b30a1a0da9..471dc180397 100644
--- a/lld/test/ELF/cgprofile-warn.s
+++ b/lld/test/ELF/cgprofile-warn.s
@@ -7,7 +7,7 @@
# RUN: echo "B C 30" >> %t.call_graph
# RUN: echo "adena A 30" >> %t.call_graph
# RUN: echo "poppy A 30" >> %t.call_graph
-# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t.out \
+# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o /dev/null \
# RUN: -noinhibit-exec -icf=all 2>&1 | FileCheck %s
.section .text.C,"ax",@progbits
diff --git a/lld/test/ELF/compressed-debug-conflict.s b/lld/test/ELF/compressed-debug-conflict.s
index f7ddd2dc52b..e8c24262b7f 100644
--- a/lld/test/ELF/compressed-debug-conflict.s
+++ b/lld/test/ELF/compressed-debug-conflict.s
@@ -1,7 +1,7 @@
# REQUIRES: x86, zlib
# RUN: llvm-mc -filetype=obj -triple i686-linux-gnu -compress-debug-sections=zlib %s -o %t.o
# RUN: llvm-readobj -sections %t.o | FileCheck -check-prefix=OBJ %s
-# RUN: not ld.lld %t.o %t.o -o %tout 2>&1 | FileCheck -check-prefix=ERROR %s
+# RUN: not ld.lld %t.o %t.o -o /dev/null 2>&1 | FileCheck -check-prefix=ERROR %s
# OBJ: Sections [
# OBJ: Section {
diff --git a/lld/test/ELF/conflict-debug-variable2.s b/lld/test/ELF/conflict-debug-variable2.s
index a93ef4bd4d4..3fb59e6b4d0 100644
--- a/lld/test/ELF/conflict-debug-variable2.s
+++ b/lld/test/ELF/conflict-debug-variable2.s
@@ -19,7 +19,7 @@
# INPUT-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_addr 0x0)
## Check we use information from .debug_info in messages.
-# RUN: not ld.lld %t.o %t.o -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: duplicate symbol: bar
# CHECK-NEXT: >>> defined at test.c:2
# CHECK-NEXT: >>> {{.*}}:(bar)
diff --git a/lld/test/ELF/conflict-variable-linkage-name.s b/lld/test/ELF/conflict-variable-linkage-name.s
index 7e96b49487f..9b201d93a83 100644
--- a/lld/test/ELF/conflict-variable-linkage-name.s
+++ b/lld/test/ELF/conflict-variable-linkage-name.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: not ld.lld %t.o %t.o -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o %t.o -o /dev/null 2>&1 | FileCheck %s
## Check we can report the locations of 2 different "bar" variables.
# CHECK: duplicate symbol: A::bar
diff --git a/lld/test/ELF/conflict.s b/lld/test/ELF/conflict.s
index 4318759cbc1..cbe1b5b8845 100644
--- a/lld/test/ELF/conflict.s
+++ b/lld/test/ELF/conflict.s
@@ -34,7 +34,7 @@
# ARCHIVE-NEXT: >>> defined at {{.*}}:(.text+0x0) in archive {{.*}}.a
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/conflict-debug.s -o %t-dbg.o
-# RUN: not ld.lld %t-dbg.o %t-dbg.o -o %t-dbg 2>&1 | FileCheck -check-prefix=DBGINFO %s
+# RUN: not ld.lld %t-dbg.o %t-dbg.o -o /dev/null 2>&1 | FileCheck -check-prefix=DBGINFO %s
# DBGINFO: duplicate symbol: zed
# DBGINFO-NEXT: >>> defined at conflict-debug.s:4
diff --git a/lld/test/ELF/copy-in-shared.s b/lld/test/ELF/copy-in-shared.s
index 6af54c14dee..a5508932d03 100644
--- a/lld/test/ELF/copy-in-shared.s
+++ b/lld/test/ELF/copy-in-shared.s
@@ -2,7 +2,7 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/copy-in-shared.s -o %t1.o
// RUN: ld.lld -shared %t1.o -o %t1.so
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t2.o
-// RUN: not ld.lld %t2.o %t1.so -o %t2.so -shared 2>&1 | FileCheck %s
+// RUN: not ld.lld %t2.o %t1.so -o /dev/null -shared 2>&1 | FileCheck %s
// CHECK: can't create dynamic relocation R_X86_64_64 against symbol: foo in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
// CHECK: >>> defined in {{.*}}.so
diff --git a/lld/test/ELF/copy-rel-corrupted.s b/lld/test/ELF/copy-rel-corrupted.s
index c54e8a07c64..76f64fa7725 100644
--- a/lld/test/ELF/copy-rel-corrupted.s
+++ b/lld/test/ELF/copy-rel-corrupted.s
@@ -2,7 +2,7 @@
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
// RUN: llvm-mc %p/Inputs/copy-rel-corrupted.s -o %t2.o -filetype=obj -triple=x86_64-pc-linux
// RUN: ld.lld %t2.o -o %t2.so -shared
-// RUN: not ld.lld %t.o %t2.so -o %t.exe 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o %t2.so -o /dev/null 2>&1 | FileCheck %s
// CHECK: error: cannot create a copy relocation for symbol x
diff --git a/lld/test/ELF/copy-rel-pie-error.s b/lld/test/ELF/copy-rel-pie-error.s
index 8bf08ed17fd..379442e1176 100644
--- a/lld/test/ELF/copy-rel-pie-error.s
+++ b/lld/test/ELF/copy-rel-pie-error.s
@@ -2,7 +2,7 @@
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
// RUN: llvm-mc %p/Inputs/copy-rel-pie.s -o %t2.o -filetype=obj -triple=x86_64-pc-linux
// RUN: ld.lld %t2.o -o %t2.so -shared
-// RUN: not ld.lld %t.o %t2.so -o %t.exe -pie 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o %t2.so -o /dev/null -pie 2>&1 | FileCheck %s
// CHECK: can't create dynamic relocation R_X86_64_64 against symbol: bar in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
// CHECK: >>> defined in {{.*}}.so
diff --git a/lld/test/ELF/corrupted-version-reference.s b/lld/test/ELF/corrupted-version-reference.s
index 1b41d721015..203dc2afd8a 100644
--- a/lld/test/ELF/corrupted-version-reference.s
+++ b/lld/test/ELF/corrupted-version-reference.s
@@ -1,6 +1,6 @@
# REQUIRES: mips
# RUN: llvm-mc -triple=mips64-unknown-freebsd %s -filetype=obj -o %t.o
-# RUN: not ld.lld %t.o %S/Inputs/corrupt-version-reference.so -o %t.exe 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o %S/Inputs/corrupt-version-reference.so -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: corrupt input file: version definition index 9 for symbol __cxa_finalize is out of bounds
# CHECK: >>> defined in {{.+}}/corrupt-version-reference.so
diff --git a/lld/test/ELF/defined-tls_get_addr.s b/lld/test/ELF/defined-tls_get_addr.s
index 0897be927e9..66ec0159756 100644
--- a/lld/test/ELF/defined-tls_get_addr.s
+++ b/lld/test/ELF/defined-tls_get_addr.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc %s -o %t.o -triple x86_64-pc-linux -filetype=obj
-// RUN: ld.lld %t.o -o %t
+// RUN: ld.lld %t.o -o /dev/null
// Don't error if __tls_get_addr is defined.
diff --git a/lld/test/ELF/dynamic-reloc-in-ro.s b/lld/test/ELF/dynamic-reloc-in-ro.s
index 4dee4f66190..920f1d5fe34 100644
--- a/lld/test/ELF/dynamic-reloc-in-ro.s
+++ b/lld/test/ELF/dynamic-reloc-in-ro.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o -o /dev/null -shared 2>&1 | FileCheck %s
// CHECK: can't create dynamic relocation R_X86_64_64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
// CHECK-NEXT: >>> defined in {{.*}}.o
diff --git a/lld/test/ELF/eh-frame-dyn-rel.s b/lld/test/ELF/eh-frame-dyn-rel.s
index a244ac62018..f54e62b5eed 100644
--- a/lld/test/ELF/eh-frame-dyn-rel.s
+++ b/lld/test/ELF/eh-frame-dyn-rel.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: not ld.lld %t.o %t.o -o %t -shared 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o %t.o -o /dev/null -shared 2>&1 | FileCheck %s
// CHECK: can't create dynamic relocation R_X86_64_64 against symbol: foo in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
// CHECK: >>> defined in {{.*}}.o
diff --git a/lld/test/ELF/eh-frame-multilpe-cie.s b/lld/test/ELF/eh-frame-multilpe-cie.s
index a504b395cce..a52e686d9d1 100644
--- a/lld/test/ELF/eh-frame-multilpe-cie.s
+++ b/lld/test/ELF/eh-frame-multilpe-cie.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
-// RUN: ld.lld --eh-frame-hdr %t.o -o %t.so -shared
+// RUN: ld.lld --eh-frame-hdr %t.o -o /dev/null -shared
// We would fail to parse multiple cies in the same file.
.cfi_startproc
diff --git a/lld/test/ELF/eh-frame-rel.s b/lld/test/ELF/eh-frame-rel.s
index a417dc12608..d633e6a082e 100644
--- a/lld/test/ELF/eh-frame-rel.s
+++ b/lld/test/ELF/eh-frame-rel.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t.o
-// RUN: ld.lld %t.o %t.o -o %t -shared
+// RUN: ld.lld %t.o %t.o -o /dev/null -shared
// We used to try to read the relocations as RELA and error out
.cfi_startproc
diff --git a/lld/test/ELF/eh-frame-value-format1.s b/lld/test/ELF/eh-frame-value-format1.s
index 1190244afba..a8bcffb4fe4 100644
--- a/lld/test/ELF/eh-frame-value-format1.s
+++ b/lld/test/ELF/eh-frame-value-format1.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: ld.lld --eh-frame-hdr %t -o %t2
+# RUN: ld.lld --eh-frame-hdr %t -o /dev/null
.section .eh_frame
.byte 0x14
diff --git a/lld/test/ELF/eh-frame-value-format2.s b/lld/test/ELF/eh-frame-value-format2.s
index 988d5088116..52bba25010d 100644
--- a/lld/test/ELF/eh-frame-value-format2.s
+++ b/lld/test/ELF/eh-frame-value-format2.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: ld.lld --eh-frame-hdr %t -o %t2
+# RUN: ld.lld --eh-frame-hdr %t -o /dev/null
.section .eh_frame
.byte 0x14
diff --git a/lld/test/ELF/eh-frame-value-format3.s b/lld/test/ELF/eh-frame-value-format3.s
index dd0d853aa5b..1f174ae60a0 100644
--- a/lld/test/ELF/eh-frame-value-format3.s
+++ b/lld/test/ELF/eh-frame-value-format3.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: ld.lld --eh-frame-hdr %t -o %t2
+# RUN: ld.lld --eh-frame-hdr %t -o /dev/null
.section .eh_frame
.byte 0x0E
diff --git a/lld/test/ELF/eh-frame-value-format4.s b/lld/test/ELF/eh-frame-value-format4.s
index 404a8605024..d10988a4fc8 100644
--- a/lld/test/ELF/eh-frame-value-format4.s
+++ b/lld/test/ELF/eh-frame-value-format4.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: ld.lld --eh-frame-hdr %t -o %t2
+# RUN: ld.lld --eh-frame-hdr %t -o /dev/null
.section .eh_frame
.byte 0x0E
diff --git a/lld/test/ELF/eh-frame-value-format5.s b/lld/test/ELF/eh-frame-value-format5.s
index ef48087c3ec..fd5b35a8b05 100644
--- a/lld/test/ELF/eh-frame-value-format5.s
+++ b/lld/test/ELF/eh-frame-value-format5.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: ld.lld --eh-frame-hdr %t -o %t2
+# RUN: ld.lld --eh-frame-hdr %t -o /dev/null
.section .eh_frame
.byte 0x14
diff --git a/lld/test/ELF/eh-frame-value-format6.s b/lld/test/ELF/eh-frame-value-format6.s
index ef48087c3ec..fd5b35a8b05 100644
--- a/lld/test/ELF/eh-frame-value-format6.s
+++ b/lld/test/ELF/eh-frame-value-format6.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: ld.lld --eh-frame-hdr %t -o %t2
+# RUN: ld.lld --eh-frame-hdr %t -o /dev/null
.section .eh_frame
.byte 0x14
diff --git a/lld/test/ELF/empty-archive.s b/lld/test/ELF/empty-archive.s
index 1e7d70eceff..72232415a58 100644
--- a/lld/test/ELF/empty-archive.s
+++ b/lld/test/ELF/empty-archive.s
@@ -1,4 +1,4 @@
// REQUIRES: x86
// RUN: llvm-ar rc %t.a
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: ld.lld -shared %t.o %t.a -o %t
+// RUN: ld.lld -shared %t.o %t.a -o /dev/null
diff --git a/lld/test/ELF/executable-undefined-protected-ignoreall.s b/lld/test/ELF/executable-undefined-protected-ignoreall.s
index 37911791e12..967a6938867 100644
--- a/lld/test/ELF/executable-undefined-protected-ignoreall.s
+++ b/lld/test/ELF/executable-undefined-protected-ignoreall.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: not ld.lld %t -o %tout --unresolved-symbols=ignore-all -pie 2>&1 | FileCheck %s
+# RUN: not ld.lld %t -o /dev/null --unresolved-symbols=ignore-all -pie 2>&1 | FileCheck %s
# CHECK: error: undefined symbol: foo
.protected foo
diff --git a/lld/test/ELF/fatal-warnings.s b/lld/test/ELF/fatal-warnings.s
index 0bc2a2b4447..51f2864a059 100644
--- a/lld/test/ELF/fatal-warnings.s
+++ b/lld/test/ELF/fatal-warnings.s
@@ -2,11 +2,11 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/warn-common.s -o %t2.o
-# RUN: ld.lld --warn-common %t1.o %t2.o -o %t1.out 2>&1 | \
+# RUN: ld.lld --warn-common %t1.o %t2.o -o /dev/null 2>&1 | \
# RUN: FileCheck -check-prefix=ERR %s
# ERR: multiple common of
-# RUN: not ld.lld --warn-common --fatal-warnings %t1.o %t2.o -o %t2.out 2>&1 | \
+# RUN: not ld.lld --warn-common --fatal-warnings %t1.o %t2.o -o /dev/null 2>&1 | \
# RUN: FileCheck -check-prefix=ERR %s
.globl _start
diff --git a/lld/test/ELF/filter.s b/lld/test/ELF/filter.s
index 66a7cb1c5ac..2b07c01013d 100644
--- a/lld/test/ELF/filter.s
+++ b/lld/test/ELF/filter.s
@@ -16,5 +16,5 @@
# CHECK-NEXT: 0x000000007FFFFFFF FILTER Filter library: [foo.so]
# CHECK-NEXT: 0x000000007FFFFFFF FILTER Filter library: [boo.so]
-# RUN: not ld.lld %t.o -F x -o %t 2>&1 | FileCheck -check-prefix=ERR %s
+# RUN: not ld.lld %t.o -F x -o /dev/null 2>&1 | FileCheck -check-prefix=ERR %s
# ERR: -F may not be used without -shared
diff --git a/lld/test/ELF/gc-absolute.s b/lld/test/ELF/gc-absolute.s
index 29e671678ee..bd0870c263a 100644
--- a/lld/test/ELF/gc-absolute.s
+++ b/lld/test/ELF/gc-absolute.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2 -shared --gc-sections
+# RUN: ld.lld %t -o /dev/null -shared --gc-sections
.global foo
foo = 0x123
diff --git a/lld/test/ELF/gdb-index-noranges.s b/lld/test/ELF/gdb-index-noranges.s
index 29ba91eb5a7..12080642e6c 100644
--- a/lld/test/ELF/gdb-index-noranges.s
+++ b/lld/test/ELF/gdb-index-noranges.s
@@ -10,7 +10,7 @@
##
## Debug information does not contain any address ranges.
## We crashed in that case. Check we don't.
-# RUN: ld.lld --gdb-index %t1.o -o %t
+# RUN: ld.lld --gdb-index %t1.o -o /dev/null
.section .debug_str,"MS",@progbits,1
.Lskel_string0:
diff --git a/lld/test/ELF/gdb-index-tls.s b/lld/test/ELF/gdb-index-tls.s
index 0fd7b611567..785e13f0056 100644
--- a/lld/test/ELF/gdb-index-tls.s
+++ b/lld/test/ELF/gdb-index-tls.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: ld.lld --gdb-index -shared %t.o -o %t
+# RUN: ld.lld --gdb-index -shared %t.o -o /dev/null
# This used to fail trying to compute R_X86_64_DTPOFF64
diff --git a/lld/test/ELF/global_offset_table.s b/lld/test/ELF/global_offset_table.s
index 2431192ceb5..3b86f00ae3a 100644
--- a/lld/test/ELF/global_offset_table.s
+++ b/lld/test/ELF/global_offset_table.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-// RUN: ld.lld %t -o %t2
+// RUN: ld.lld %t -o /dev/null
.global _start
_start:
.long _GLOBAL_OFFSET_TABLE_
diff --git a/lld/test/ELF/i386-debug-noabs.test b/lld/test/ELF/i386-debug-noabs.test
index c0eb4d9562d..dbc7a57f8f7 100644
--- a/lld/test/ELF/i386-debug-noabs.test
+++ b/lld/test/ELF/i386-debug-noabs.test
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: yaml2obj %s -o %t.o
-# RUN: ld.lld %t.o -o %t.exe --entry 0 --fatal-warnings
+# RUN: ld.lld %t.o -o /dev/null --entry 0 --fatal-warnings
## This is for https://bugs.llvm.org//show_bug.cgi?id=34852. GCC 8.0 or
## earlier have a bug which creates non-absolute R_386_GOTPC relocations
diff --git a/lld/test/ELF/i386-reloc-16.s b/lld/test/ELF/i386-reloc-16.s
index 33b6c44e9d4..9a099a6ba3e 100644
--- a/lld/test/ELF/i386-reloc-16.s
+++ b/lld/test/ELF/i386-reloc-16.s
@@ -9,7 +9,7 @@
// CHECK: Contents of section .text:
// CHECK-NEXT: 1000 42
-// RUN: not ld.lld -shared %t %t2 -o %t4 2>&1 | FileCheck --check-prefix=ERROR %s
+// RUN: not ld.lld -shared %t %t2 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR %s
// ERROR: relocation R_386_16 out of range: 65536 is not in [-32768, 32767]
.short foo
diff --git a/lld/test/ELF/i386-reloc-8.s b/lld/test/ELF/i386-reloc-8.s
index 9e9f0ccf30d..b46aaa68826 100644
--- a/lld/test/ELF/i386-reloc-8.s
+++ b/lld/test/ELF/i386-reloc-8.s
@@ -9,7 +9,7 @@
// CHECK: Contents of section .text:
// CHECK-NEXT: 1000 ff
-// RUN: not ld.lld -shared %t %t2 -o %t4 2>&1 | FileCheck --check-prefix=ERROR %s
+// RUN: not ld.lld -shared %t %t2 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR %s
// ERROR: relocation R_386_8 out of range: 256 is not in [-128, 127]
.byte foo
diff --git a/lld/test/ELF/i386-reloc-range.s b/lld/test/ELF/i386-reloc-range.s
index 6f72f7af73c..4378bb6f9d1 100644
--- a/lld/test/ELF/i386-reloc-range.s
+++ b/lld/test/ELF/i386-reloc-range.s
@@ -14,7 +14,7 @@
// CHECK-NEXT: 200: {{.*}} jmp -1
// 0x10202 - 0x203 == 0xffff
-// RUN: not ld.lld -Ttext 0x200 %t.o %t2.o -o %t2 2>&1 | FileCheck --check-prefix=ERR %s
+// RUN: not ld.lld -Ttext 0x200 %t.o %t2.o -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s
// ERR: {{.*}}:(.text+0x1): relocation R_386_PC16 out of range: 65536 is not in [-65536, 65535]
diff --git a/lld/test/ELF/i386-tls-got.s b/lld/test/ELF/i386-tls-got.s
index 56be4a138d9..efd45152164 100644
--- a/lld/test/ELF/i386-tls-got.s
+++ b/lld/test/ELF/i386-tls-got.s
@@ -2,6 +2,6 @@
# RUN: llvm-mc -filetype=obj -triple=i386-pc-linux %S/Inputs/i386-tls-got.s -o %t1.o
# RUN: ld.lld %t1.o -o %t1.so -shared
# RUN: llvm-mc -filetype=obj -triple=i386-pc-linux %s -o %t2.o
-# RUN: ld.lld %t2.o %t1.so -o %t
+# RUN: ld.lld %t2.o %t1.so -o /dev/null
addl foobar@INDNTPOFF, %eax
diff --git a/lld/test/ELF/icf-absolute.s b/lld/test/ELF/icf-absolute.s
index dcba213ee8a..3eef7a2d7e2 100644
--- a/lld/test/ELF/icf-absolute.s
+++ b/lld/test/ELF/icf-absolute.s
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/icf-absolute.s -o %t2
-# RUN: ld.lld %t %t2 -o %t3 --icf=all --print-icf-sections | FileCheck %s
+# RUN: ld.lld %t %t2 -o /dev/null --icf=all --print-icf-sections | FileCheck %s
# CHECK: selected section {{.*}}:(.text.f1)
# CHECK: removing identical section {{.*}}:(.text.f2)
diff --git a/lld/test/ELF/icf-c-identifier.s b/lld/test/ELF/icf-c-identifier.s
index b1bd93476cc..cd11b98b57a 100644
--- a/lld/test/ELF/icf-c-identifier.s
+++ b/lld/test/ELF/icf-c-identifier.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2 --icf=all --print-icf-sections | count 0
+# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections | count 0
.section foo,"ax",@progbits,unique,0
.byte 42
diff --git a/lld/test/ELF/icf-comdat.s b/lld/test/ELF/icf-comdat.s
index 32899f25da3..761dd2ecdc9 100644
--- a/lld/test/ELF/icf-comdat.s
+++ b/lld/test/ELF/icf-comdat.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2 --icf=all --print-icf-sections | FileCheck %s
+# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections | FileCheck %s
# CHECK: selected section {{.*}}:(.text.f1)
# CHECK: removing identical section {{.*}}:(.text.f2)
diff --git a/lld/test/ELF/icf-different-output-sections.s b/lld/test/ELF/icf-different-output-sections.s
index 5f44f9b0bc3..085573120e4 100644
--- a/lld/test/ELF/icf-different-output-sections.s
+++ b/lld/test/ELF/icf-different-output-sections.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2 --icf=all --print-icf-sections | count 0
+# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections | count 0
.section .foo,"ax"
.byte 42
diff --git a/lld/test/ELF/icf-i386.s b/lld/test/ELF/icf-i386.s
index f43787e0bd6..67c7262dadd 100644
--- a/lld/test/ELF/icf-i386.s
+++ b/lld/test/ELF/icf-i386.s
@@ -2,7 +2,7 @@
# This test is to make sure that we can handle implicit addends properly.
# RUN: llvm-mc -filetype=obj -triple=i386-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2 --icf=all --print-icf-sections 2>&1 | FileCheck %s
+# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck %s
# CHECK: selected section {{.*}}:(.text.f1)
# CHECK: removing identical section {{.*}}:(.text.f2)
diff --git a/lld/test/ELF/icf-many-sections.s b/lld/test/ELF/icf-many-sections.s
index 356714818db..766a003dd77 100644
--- a/lld/test/ELF/icf-many-sections.s
+++ b/lld/test/ELF/icf-many-sections.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t
-# RUN: ld.lld --icf=all --print-icf-sections %t -o %t2 | FileCheck %s -allow-empty
+# RUN: ld.lld --icf=all --print-icf-sections %t -o /dev/null | FileCheck %s -allow-empty
# CHECK-NOT: selected
diff --git a/lld/test/ELF/icf-merge-sec.s b/lld/test/ELF/icf-merge-sec.s
index 2eef3f84f04..060f19d3469 100644
--- a/lld/test/ELF/icf-merge-sec.s
+++ b/lld/test/ELF/icf-merge-sec.s
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/icf-merge-sec.s -o %t2
-# RUN: ld.lld %t %t2 -o %t3 --icf=all --print-icf-sections | FileCheck %s
+# RUN: ld.lld %t %t2 -o /dev/null --icf=all --print-icf-sections | FileCheck %s
# CHECK: selected section {{.*}}:(.text.f1)
# CHECK: removing identical section {{.*}}:(.text.f2)
diff --git a/lld/test/ELF/icf-merge.s b/lld/test/ELF/icf-merge.s
index f3f605c9496..5aa79f9d14e 100644
--- a/lld/test/ELF/icf-merge.s
+++ b/lld/test/ELF/icf-merge.s
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/icf-merge.s -o %t1
-# RUN: ld.lld %t %t1 -o %t1.out --icf=all --print-icf-sections | FileCheck %s
+# RUN: ld.lld %t %t1 -o /dev/null --icf=all --print-icf-sections | FileCheck %s
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/icf-merge2.s -o %t2
# RUN: ld.lld %t %t2 -o %t3.out --icf=all --print-icf-sections | FileCheck --check-prefix=NOMERGE %s
diff --git a/lld/test/ELF/icf-non-mergeable.s b/lld/test/ELF/icf-non-mergeable.s
index cefe36070c3..978ac156b70 100644
--- a/lld/test/ELF/icf-non-mergeable.s
+++ b/lld/test/ELF/icf-non-mergeable.s
@@ -8,7 +8,7 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
// RUN: %p/Inputs/icf-non-mergeable.s -o %t2
-// RUN: ld.lld %t1 %t2 -o %t3 --icf=all --verbose 2>&1 | FileCheck %s
+// RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --verbose 2>&1 | FileCheck %s
// CHECK-NOT: selected section '.text.f1'
// CHECK-NOT: removing identical section '.text.f2'
diff --git a/lld/test/ELF/icf-none.s b/lld/test/ELF/icf-none.s
index ed3e2dcea30..7c73361c2ce 100644
--- a/lld/test/ELF/icf-none.s
+++ b/lld/test/ELF/icf-none.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2 --icf=all --icf=none --verbose 2>&1 | FileCheck %s
+# RUN: ld.lld %t -o /dev/null --icf=all --icf=none --verbose 2>&1 | FileCheck %s
# CHECK-NOT: selected section '.text.f1'
diff --git a/lld/test/ELF/icf-relro.s b/lld/test/ELF/icf-relro.s
index 492c0421367..874fa7b19f9 100644
--- a/lld/test/ELF/icf-relro.s
+++ b/lld/test/ELF/icf-relro.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2 --icf=all --ignore-data-address-equality --print-icf-sections | FileCheck %s
+# RUN: ld.lld %t -o /dev/null --icf=all --ignore-data-address-equality --print-icf-sections | FileCheck %s
# CHECK: selected section {{.*}}:(.data.rel.ro)
# CHECK: removing identical section {{.*}}:(.data.rel.ro.foo)
diff --git a/lld/test/ELF/icf1.s b/lld/test/ELF/icf1.s
index e0db01eecb4..5c6e667d53c 100644
--- a/lld/test/ELF/icf1.s
+++ b/lld/test/ELF/icf1.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2 --icf=all --print-icf-sections | FileCheck %s
+# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections | FileCheck %s
# CHECK: selected section {{.*}}:(.text.f1)
# CHECK: removing identical section {{.*}}:(.text.f2)
diff --git a/lld/test/ELF/icf10.test b/lld/test/ELF/icf10.test
index 97b11269077..96b4caf2f2e 100644
--- a/lld/test/ELF/icf10.test
+++ b/lld/test/ELF/icf10.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj %s -o %t.o
-# RUN: ld.lld --icf=all %t.o -o %t --print-icf-sections 2>&1 | FileCheck %s
+# RUN: ld.lld --icf=all %t.o -o /dev/null --print-icf-sections 2>&1 | FileCheck %s
# Checks that ICF does not merge 2 sections the offset of
# the relocations of which differ.
diff --git a/lld/test/ELF/icf11.test b/lld/test/ELF/icf11.test
index cddd2844454..8c3aa93568d 100644
--- a/lld/test/ELF/icf11.test
+++ b/lld/test/ELF/icf11.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj %s -o %t.o
-# RUN: ld.lld --icf=all %t.o -o %t --print-icf-sections 2>&1 | FileCheck %s
+# RUN: ld.lld --icf=all %t.o -o /dev/null --print-icf-sections 2>&1 | FileCheck %s
# Checks that ICF does not merge 2 sections the type of
# the relocations of which differ.
diff --git a/lld/test/ELF/icf12.s b/lld/test/ELF/icf12.s
index 749c00ddc2e..aa1e8af9ebd 100644
--- a/lld/test/ELF/icf12.s
+++ b/lld/test/ELF/icf12.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
-# RUN: ld.lld %t1 -o %t --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# RUN: ld.lld %t1 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
# Check that ICF does not merge 2 sections which relocations
# differs in addend only.
diff --git a/lld/test/ELF/icf13.s b/lld/test/ELF/icf13.s
index 1c1e42c5430..2fe707f11c7 100644
--- a/lld/test/ELF/icf13.s
+++ b/lld/test/ELF/icf13.s
@@ -1,5 +1,5 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
-# RUN: ld.lld -shared -z notext %t1 -o %t --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# RUN: ld.lld -shared -z notext %t1 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
## Check that ICF does not merge sections which relocations point to symbols
## that are not of the regular defined kind.
diff --git a/lld/test/ELF/icf14.s b/lld/test/ELF/icf14.s
index 344543b971c..caa33e4d14b 100644
--- a/lld/test/ELF/icf14.s
+++ b/lld/test/ELF/icf14.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
-# RUN: ld.lld %t1 -o %t --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# RUN: ld.lld %t1 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
# Check that ICF does not merge 2 sections which relocations
# refer to symbols that live in sections of the different types
diff --git a/lld/test/ELF/icf15.s b/lld/test/ELF/icf15.s
index 0cd40faa221..57c1735e151 100644
--- a/lld/test/ELF/icf15.s
+++ b/lld/test/ELF/icf15.s
@@ -1,5 +1,5 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
-# RUN: ld.lld %t1 -o %t --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# RUN: ld.lld %t1 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
## Check that ICF does not merge sections which relocations have equal addends,
## but different target values.
diff --git a/lld/test/ELF/icf16.s b/lld/test/ELF/icf16.s
index ca2d1be05e8..e7650af37c3 100644
--- a/lld/test/ELF/icf16.s
+++ b/lld/test/ELF/icf16.s
@@ -1,5 +1,5 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
-# RUN: ld.lld -shared -z notext %t1 -o %t --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# RUN: ld.lld -shared -z notext %t1 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
## ICF is able to merge sections which relocations referring regular input sections
## or mergeable sections. .eh_frame is represented with a different kind of section,
diff --git a/lld/test/ELF/icf2.s b/lld/test/ELF/icf2.s
index f76d2148a80..8a456c7ee01 100644
--- a/lld/test/ELF/icf2.s
+++ b/lld/test/ELF/icf2.s
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/icf2.s -o %t2
-# RUN: ld.lld %t1 %t2 -o %t --icf=all --print-icf-sections 2>&1 | FileCheck %s
+# RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck %s
# CHECK: selected section {{.*}}:(.text.f1)
# CHECK: removing identical section {{.*}}:(.text.f2)
diff --git a/lld/test/ELF/icf3.s b/lld/test/ELF/icf3.s
index 3e5c5699b22..7ae4acfb131 100644
--- a/lld/test/ELF/icf3.s
+++ b/lld/test/ELF/icf3.s
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/icf2.s -o %t2
-# RUN: ld.lld %t1 %t2 -o %t --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
# CHECK-NOT: selected section '.text.f1' from file
# CHECK-NOT: selected section '.text.f2' from file
diff --git a/lld/test/ELF/icf4.s b/lld/test/ELF/icf4.s
index 185b105949a..2b047968181 100644
--- a/lld/test/ELF/icf4.s
+++ b/lld/test/ELF/icf4.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2 --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
# CHECK-NOT: selected section '.text.f1'
# CHECK-NOT: selected section '.text.f2'
diff --git a/lld/test/ELF/icf5.s b/lld/test/ELF/icf5.s
index 13fe194654a..86c0bc4b9e4 100644
--- a/lld/test/ELF/icf5.s
+++ b/lld/test/ELF/icf5.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2 --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
# CHECK-NOT: selected section '.text.f1'
# CHECK-NOT: selected section '.text.f2'
diff --git a/lld/test/ELF/icf6.s b/lld/test/ELF/icf6.s
index 91b6f48bd0d..0819d51f184 100644
--- a/lld/test/ELF/icf6.s
+++ b/lld/test/ELF/icf6.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2 --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
# CHECK-NOT: selected section '.text.f1'
# CHECK-NOT: selected section '.text.f2'
diff --git a/lld/test/ELF/incompatible-ar-first.s b/lld/test/ELF/incompatible-ar-first.s
index abaa53492c1..fbbe9de761e 100644
--- a/lld/test/ELF/incompatible-ar-first.s
+++ b/lld/test/ELF/incompatible-ar-first.s
@@ -2,7 +2,7 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/archive.s -o %ta.o
// RUN: llvm-ar rc %t.a %ta.o
// RUN: llvm-mc -filetype=obj -triple=i686-linux %s -o %tb.o
-// RUN: not ld.lld %t.a %tb.o -o %t 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.a %tb.o -o /dev/null 2>&1 | FileCheck %s
// We used to crash when
// * The first object seen by the symbol table is from an archive.
diff --git a/lld/test/ELF/incompatible-section-flags.s b/lld/test/ELF/incompatible-section-flags.s
index bb4a556d3af..30bbe75d766 100644
--- a/lld/test/ELF/incompatible-section-flags.s
+++ b/lld/test/ELF/incompatible-section-flags.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: not ld.lld -shared %t.o -o %t 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: error: incompatible section flags for .foo
// CHECK-NEXT: >>> {{.*}}incompatible-section-flags.s.tmp.o:(.foo): 0x3
diff --git a/lld/test/ELF/incompatible-section-types2.s b/lld/test/ELF/incompatible-section-types2.s
index 02fb7500131..3e281ce6c5d 100644
--- a/lld/test/ELF/incompatible-section-types2.s
+++ b/lld/test/ELF/incompatible-section-types2.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: error: section type mismatch for .shstrtab
// CHECK-NEXT: >>> <internal>:(.shstrtab): SHT_STRTAB
diff --git a/lld/test/ELF/invalid-cie-length.s b/lld/test/ELF/invalid-cie-length.s
index c6da95e609d..7e73dd8aa5d 100644
--- a/lld/test/ELF/invalid-cie-length.s
+++ b/lld/test/ELF/invalid-cie-length.s
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-// RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck %s
.section .eh_frame
.byte 0
diff --git a/lld/test/ELF/invalid-cie-length2.s b/lld/test/ELF/invalid-cie-length2.s
index 9140280ba5a..a43491c1779 100644
--- a/lld/test/ELF/invalid-cie-length2.s
+++ b/lld/test/ELF/invalid-cie-length2.s
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-// RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck %s
.section .eh_frame
.long 42
diff --git a/lld/test/ELF/invalid-cie-length3.s b/lld/test/ELF/invalid-cie-length3.s
index fcbfa7f52ba..3417efcba8f 100644
--- a/lld/test/ELF/invalid-cie-length3.s
+++ b/lld/test/ELF/invalid-cie-length3.s
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-// RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck %s
.section .eh_frame
.long 0xFFFFFFFC
diff --git a/lld/test/ELF/invalid-cie-length4.s b/lld/test/ELF/invalid-cie-length4.s
index 04f8eb2cca6..cf3a6f51374 100644
--- a/lld/test/ELF/invalid-cie-length4.s
+++ b/lld/test/ELF/invalid-cie-length4.s
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-// RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck %s
.section .eh_frame
.long 0xFFFFFFFF
diff --git a/lld/test/ELF/invalid-cie-length5.s b/lld/test/ELF/invalid-cie-length5.s
index bfa35edf7db..223ce125853 100644
--- a/lld/test/ELF/invalid-cie-length5.s
+++ b/lld/test/ELF/invalid-cie-length5.s
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-// RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck %s
.section .eh_frame
.long 0xFFFFFFFF
diff --git a/lld/test/ELF/invalid-cie-reference.s b/lld/test/ELF/invalid-cie-reference.s
index fba2467e216..0f64c4a429b 100644
--- a/lld/test/ELF/invalid-cie-reference.s
+++ b/lld/test/ELF/invalid-cie-reference.s
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-// RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck %s
.section .eh_frame
.long 0x14
diff --git a/lld/test/ELF/invalid-eh-frame.s b/lld/test/ELF/invalid-eh-frame.s
index 2a29039d03e..53344287234 100644
--- a/lld/test/ELF/invalid-eh-frame.s
+++ b/lld/test/ELF/invalid-eh-frame.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: not ld.lld --eh-frame-hdr %t -o %t2 2>&1 | FileCheck %s
+# RUN: not ld.lld --eh-frame-hdr %t -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: corrupted .eh_frame: unexpected end of CIE
# CHECK-NEXT: >>> defined in {{.*}}:(.eh_frame+0x8)
diff --git a/lld/test/ELF/invalid-eh-frame2.s b/lld/test/ELF/invalid-eh-frame2.s
index d8e5640c264..c8995cbe1c8 100644
--- a/lld/test/ELF/invalid-eh-frame2.s
+++ b/lld/test/ELF/invalid-eh-frame2.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: not ld.lld --eh-frame-hdr %t -o %t2 2>&1 | FileCheck %s
+# RUN: not ld.lld --eh-frame-hdr %t -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: corrupted .eh_frame: corrupted CIE (failed to read string)
# CHECK-NEXT: >>> defined in {{.*}}:(.eh_frame+0x9)
diff --git a/lld/test/ELF/invalid-eh-frame3.s b/lld/test/ELF/invalid-eh-frame3.s
index 6d4f8d24a58..44592cbe3c8 100644
--- a/lld/test/ELF/invalid-eh-frame3.s
+++ b/lld/test/ELF/invalid-eh-frame3.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: not ld.lld --eh-frame-hdr %t -o %t2 2>&1 | FileCheck %s
+# RUN: not ld.lld --eh-frame-hdr %t -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: corrupted .eh_frame: corrupted CIE (failed to read LEB128)
# CHECK-NEXT: >>> defined in {{.*}}:(.eh_frame+0xC)
diff --git a/lld/test/ELF/invalid-eh-frame4.s b/lld/test/ELF/invalid-eh-frame4.s
index c90f06356af..4022c04476d 100644
--- a/lld/test/ELF/invalid-eh-frame4.s
+++ b/lld/test/ELF/invalid-eh-frame4.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: not ld.lld --eh-frame-hdr %t -o %t2 2>&1 | FileCheck %s
+# RUN: not ld.lld --eh-frame-hdr %t -o /dev/null 2>&1 | FileCheck %s
# CHECK: corrupted .eh_frame: unknown .eh_frame augmentation string:
diff --git a/lld/test/ELF/invalid-eh-frame5.s b/lld/test/ELF/invalid-eh-frame5.s
index ada4ee09b00..eb153fa92c4 100644
--- a/lld/test/ELF/invalid-eh-frame5.s
+++ b/lld/test/ELF/invalid-eh-frame5.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: not ld.lld --eh-frame-hdr %t -o %t2 2>&1 | FileCheck %s
+# RUN: not ld.lld --eh-frame-hdr %t -o /dev/null 2>&1 | FileCheck %s
# CHECK: corrupted .eh_frame: unknown .eh_frame augmentation string:
diff --git a/lld/test/ELF/invalid-eh-frame6.s b/lld/test/ELF/invalid-eh-frame6.s
index 59aff384d23..9b6b7f8bf87 100644
--- a/lld/test/ELF/invalid-eh-frame6.s
+++ b/lld/test/ELF/invalid-eh-frame6.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: not ld.lld --eh-frame-hdr %t -o %t2 2>&1 | FileCheck %s
+# RUN: not ld.lld --eh-frame-hdr %t -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: corrupted .eh_frame: unknown FDE encoding
# CHECK-NEXT: >>> defined in {{.*}}:(.eh_frame+0xE)
diff --git a/lld/test/ELF/invalid-eh-frame7.s b/lld/test/ELF/invalid-eh-frame7.s
index 03dd9dfa906..81a0014049e 100644
--- a/lld/test/ELF/invalid-eh-frame7.s
+++ b/lld/test/ELF/invalid-eh-frame7.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: not ld.lld --eh-frame-hdr %t -o %t2 2>&1 | FileCheck %s
+# RUN: not ld.lld --eh-frame-hdr %t -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: corrupted .eh_frame: DW_EH_PE_aligned encoding is not supported
diff --git a/lld/test/ELF/invalid-eh-frame8.s b/lld/test/ELF/invalid-eh-frame8.s
index 6a60959cffe..484fef29f8b 100644
--- a/lld/test/ELF/invalid-eh-frame8.s
+++ b/lld/test/ELF/invalid-eh-frame8.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: not ld.lld --eh-frame-hdr %t -o %t2 2>&1 | FileCheck %s
+# RUN: not ld.lld --eh-frame-hdr %t -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: corrupted .eh_frame: corrupted CIE
diff --git a/lld/test/ELF/invalid-eh-frame9.s b/lld/test/ELF/invalid-eh-frame9.s
index 8bc1b4caadd..73a102b4f90 100644
--- a/lld/test/ELF/invalid-eh-frame9.s
+++ b/lld/test/ELF/invalid-eh-frame9.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: not ld.lld --eh-frame-hdr %t -o %t2 2>&1 | FileCheck %s
+# RUN: not ld.lld --eh-frame-hdr %t -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: corrupted .eh_frame: CIE is too small
diff --git a/lld/test/ELF/invalid-relocations.test b/lld/test/ELF/invalid-relocations.test
index cfeb44b03c6..7c32058c435 100644
--- a/lld/test/ELF/invalid-relocations.test
+++ b/lld/test/ELF/invalid-relocations.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj %s -o %t
-# RUN: not ld.lld %t -o %tout 2>&1 | FileCheck %s
+# RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck %s
!ELF
FileHeader:
diff --git a/lld/test/ELF/invalid-undef-section-symbol.test b/lld/test/ELF/invalid-undef-section-symbol.test
index 9d51f56bf99..cb89306b781 100644
--- a/lld/test/ELF/invalid-undef-section-symbol.test
+++ b/lld/test/ELF/invalid-undef-section-symbol.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj %s -o %t.o
-# RUN: not ld.lld -r %t.o -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld -r %t.o -o /dev/null 2>&1 | FileCheck %s
# We used to crash at this.
# CHECK: STT_SECTION symbol should be defined
diff --git a/lld/test/ELF/invalid/dynamic-section-size.s b/lld/test/ELF/invalid/dynamic-section-size.s
index 323dabaa901..58a7d0688c2 100644
--- a/lld/test/ELF/invalid/dynamic-section-size.s
+++ b/lld/test/ELF/invalid/dynamic-section-size.s
@@ -1,4 +1,4 @@
## dynamic-section-sh_size.elf has incorrect sh_size of dynamic section.
-# RUN: not ld.lld %p/Inputs/dynamic-section-sh_size.elf -o %t2 2>&1 | \
+# RUN: not ld.lld %p/Inputs/dynamic-section-sh_size.elf -o /dev/null 2>&1 | \
# RUN: FileCheck %s
# CHECK: error: {{.*}}: invalid sh_entsize
diff --git a/lld/test/ELF/invalid/eh-frame-hdr-no-out.s b/lld/test/ELF/invalid/eh-frame-hdr-no-out.s
index 3e82cd92d2c..221ca205e59 100644
--- a/lld/test/ELF/invalid/eh-frame-hdr-no-out.s
+++ b/lld/test/ELF/invalid/eh-frame-hdr-no-out.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-// RUN: not ld.lld --eh-frame-hdr %t -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld --eh-frame-hdr %t -o /dev/null 2>&1 | FileCheck %s
// CHECK: error: corrupted .eh_frame: FDE version 1 or 3 expected, but got 2
diff --git a/lld/test/ELF/invalid/executable.s b/lld/test/ELF/invalid/executable.s
index 33ef564adc5..254075146e1 100644
--- a/lld/test/ELF/invalid/executable.s
+++ b/lld/test/ELF/invalid/executable.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
# RUN: ld.lld -o %t1.exe %t.o
-# RUN: not ld.lld -o %t2.exe %t1.exe 2>&1 | FileCheck %s
+# RUN: not ld.lld -o /dev/null %t1.exe 2>&1 | FileCheck %s
# CHECK: unknown file type
.global _start
diff --git a/lld/test/ELF/invalid/invalid-e_shnum.s b/lld/test/ELF/invalid/invalid-e_shnum.s
index 0c720ffa171..34a742e1807 100644
--- a/lld/test/ELF/invalid/invalid-e_shnum.s
+++ b/lld/test/ELF/invalid/invalid-e_shnum.s
@@ -1,3 +1,3 @@
## Spec says that "If a file has no section header table, e_shnum holds the value zero.", though
## in this test case it holds non-zero and lld used to crash.
-# RUN: ld.lld %p/Inputs/invalid-e_shnum.elf -o %t2
+# RUN: ld.lld %p/Inputs/invalid-e_shnum.elf -o /dev/null
diff --git a/lld/test/ELF/invalid/merge-invalid-size.s b/lld/test/ELF/invalid/merge-invalid-size.s
index 1dbd7cf95b7..cc2566d0ee8 100644
--- a/lld/test/ELF/invalid/merge-invalid-size.s
+++ b/lld/test/ELF/invalid/merge-invalid-size.s
@@ -1,10 +1,10 @@
// REQUIRES: x86
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
-// RUN: not ld.lld %t.o -o %t.so 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: SHF_MERGE section size must be a multiple of sh_entsize
// Test that we accept a zero sh_entsize.
-// RUN: ld.lld %p/Inputs/shentsize-zero.elf -o %t2
+// RUN: ld.lld %p/Inputs/shentsize-zero.elf -o /dev/null
.section .foo,"aM",@progbits,4
.short 42
diff --git a/lld/test/ELF/invalid/mips-invalid-options-descriptor.s b/lld/test/ELF/invalid/mips-invalid-options-descriptor.s
index b23ecee6d0d..c05e3478529 100644
--- a/lld/test/ELF/invalid/mips-invalid-options-descriptor.s
+++ b/lld/test/ELF/invalid/mips-invalid-options-descriptor.s
@@ -1,5 +1,5 @@
## mips-invalid-options-descriptor.elf has option descriptor in
## .MIPS.options with size of zero.
-# RUN: not ld.lld %p/Inputs/mips-invalid-options-descriptor.elf -o %t2 2>&1 | \
+# RUN: not ld.lld %p/Inputs/mips-invalid-options-descriptor.elf -o /dev/null 2>&1 | \
# RUN: FileCheck %s
# CHECK: error: {{.*}}: invalid section offset
diff --git a/lld/test/ELF/invalid/section-alignment2.s b/lld/test/ELF/invalid/section-alignment2.s
index aaef9f8bff5..879ba8c03c1 100644
--- a/lld/test/ELF/invalid/section-alignment2.s
+++ b/lld/test/ELF/invalid/section-alignment2.s
@@ -1,5 +1,5 @@
## section-alignment-notpow2.elf has section alignment
## 0xFFFFFFFF which is not a power of 2.
-# RUN: not ld.lld %p/Inputs/section-alignment-notpow2.elf -o %t2 2>&1 | \
+# RUN: not ld.lld %p/Inputs/section-alignment-notpow2.elf -o /dev/null 2>&1 | \
# RUN: FileCheck %s
# CHECK: section sh_addralign is not a power of 2
diff --git a/lld/test/ELF/invalid/sht-group.s b/lld/test/ELF/invalid/sht-group.s
index f28035f0dac..a4b684c83fd 100644
--- a/lld/test/ELF/invalid/sht-group.s
+++ b/lld/test/ELF/invalid/sht-group.s
@@ -1,3 +1,3 @@
## sht-group.elf contains SHT_GROUP section with invalid sh_info.
-# RUN: not ld.lld %p/Inputs/sht-group.elf -o %t2 2>&1 | FileCheck %s
+# RUN: not ld.lld %p/Inputs/sht-group.elf -o /dev/null 2>&1 | FileCheck %s
# CHECK: invalid symbol index
diff --git a/lld/test/ELF/invalid/symbol-index.s b/lld/test/ELF/invalid/symbol-index.s
index 4ad1d6cb232..e3989b4e1ad 100644
--- a/lld/test/ELF/invalid/symbol-index.s
+++ b/lld/test/ELF/invalid/symbol-index.s
@@ -5,6 +5,6 @@
## [ 0] NULL 0000000000000000 000000 000000 00 0 0 0
## ...
## [ 4] .symtab RELA 0000000000000000 000048 000030 18 1 2 8
-# RUN: not ld.lld %p/Inputs/symbol-index.elf -o %t2 2>&1 | \
+# RUN: not ld.lld %p/Inputs/symbol-index.elf -o /dev/null 2>&1 | \
# RUN: FileCheck --check-prefix=INVALID-SYMBOL-INDEX %s
# INVALID-SYMBOL-INDEX: invalid symbol index
diff --git a/lld/test/ELF/invalid/symbol-name.s b/lld/test/ELF/invalid/symbol-name.s
index 8daee1a3fa7..53a20ef6af9 100644
--- a/lld/test/ELF/invalid/symbol-name.s
+++ b/lld/test/ELF/invalid/symbol-name.s
@@ -3,5 +3,5 @@
## symbol-name-offset.elf contains symbol with invalid (too large)
## st_name value.
# RUN: not ld.lld %S/Inputs/symbol-name-offset.elf \
-# RUN: -o %t 2>&1 | FileCheck %s
+# RUN: -o /dev/null 2>&1 | FileCheck %s
# CHECK: invalid symbol name offset
diff --git a/lld/test/ELF/invalid/tls-symbol.s b/lld/test/ELF/invalid/tls-symbol.s
index 354ca573d5c..99c47dc1302 100644
--- a/lld/test/ELF/invalid/tls-symbol.s
+++ b/lld/test/ELF/invalid/tls-symbol.s
@@ -1,5 +1,5 @@
# REQUIRES: x86
## The test file contains an STT_TLS symbol but has no TLS section.
-# RUN: not ld.lld %S/Inputs/tls-symbol.elf -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld %S/Inputs/tls-symbol.elf -o /dev/null 2>&1 | FileCheck %s
# CHECK: has an STT_TLS symbol but doesn't have an SHF_TLS section
diff --git a/lld/test/ELF/just-symbols-cref.s b/lld/test/ELF/just-symbols-cref.s
index 8581c53eb5d..64b02d90c1a 100644
--- a/lld/test/ELF/just-symbols-cref.s
+++ b/lld/test/ELF/just-symbols-cref.s
@@ -1,9 +1,9 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: ld.lld %t.o -o %t1.exe -Ttext=0x10000
+# RUN: ld.lld %t.o -o /dev/null -Ttext=0x10000
-# RUN: ld.lld -just-symbols=%t1.exe -o %t2.exe -cref | FileCheck %s
+# RUN: ld.lld -just-symbols=%t1.exe -o /dev/null -cref | FileCheck %s
# CHECK: Symbol File
# CHECK-NEXT: bar {{.*exe}}
diff --git a/lld/test/ELF/just-symbols.s b/lld/test/ELF/just-symbols.s
index 856cf8c581e..58fb24256c5 100644
--- a/lld/test/ELF/just-symbols.s
+++ b/lld/test/ELF/just-symbols.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: ld.lld %t.o -o %t1.exe -Ttext=0x10000
+# RUN: ld.lld %t.o -o /dev/null -Ttext=0x10000
# RUN: ld.lld -just-symbols=%t1.exe -o %t2.exe
# RUN: llvm-readelf -symbols %t2.exe | FileCheck %s
diff --git a/lld/test/ELF/linkerscript/assert.s b/lld/test/ELF/linkerscript/assert.s
index 100631ac86a..f7113e5b25f 100644
--- a/lld/test/ELF/linkerscript/assert.s
+++ b/lld/test/ELF/linkerscript/assert.s
@@ -6,7 +6,7 @@
# RUN: llvm-readobj %t1 > /dev/null
# RUN: echo "SECTIONS { ASSERT(0, fail) }" > %t3.script
-# RUN: not ld.lld -shared -o %t3 --script %t3.script %t1.o > %t.log 2>&1
+# RUN: not ld.lld -shared -o /dev/null --script %t3.script %t1.o > %t.log 2>&1
# RUN: FileCheck %s -check-prefix=FAIL < %t.log
# FAIL: fail
@@ -34,7 +34,7 @@
## It is consistent with how ASSERT can be written outside of the
## output section declaration.
# RUN: echo "SECTIONS { .foo : { ASSERT(1, \"true\") } }" > %t7.script
-# RUN: ld.lld -shared -o %t7 --script %t7.script %t1.o
+# RUN: ld.lld -shared -o /dev/null --script %t7.script %t1.o
.section .foo, "a"
.quad 0
diff --git a/lld/test/ELF/linkerscript/copy-rel-symbol-value-err.s b/lld/test/ELF/linkerscript/copy-rel-symbol-value-err.s
index f134edbb1d0..cd5262b142f 100644
--- a/lld/test/ELF/linkerscript/copy-rel-symbol-value-err.s
+++ b/lld/test/ELF/linkerscript/copy-rel-symbol-value-err.s
@@ -3,7 +3,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/copy-rel-symbol-value.s -o %t2.o
# RUN: ld.lld %t2.o -o %t2.so -shared
# RUN: echo "SECTIONS { . = . + SIZEOF_HEADERS; foo = bar; }" > %t.script
-# RUN: not ld.lld %t.o %t2.so --script %t.script -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o %t2.so --script %t.script -o /dev/null 2>&1 | FileCheck %s
# CHECK: symbol not found: bar
diff --git a/lld/test/ELF/linkerscript/edata-etext.s b/lld/test/ELF/linkerscript/edata-etext.s
index ab723ce1316..c15cf4c865c 100644
--- a/lld/test/ELF/linkerscript/edata-etext.s
+++ b/lld/test/ELF/linkerscript/edata-etext.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: echo "SECTIONS { }" > %t.script
-# RUN: not ld.lld %t.o -script %t.script -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o -script %t.script -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: undefined symbol: _edata
# CHECK: >>> referenced by {{.*}}:(.text+0x0)
# CHECK: error: undefined symbol: _etext
diff --git a/lld/test/ELF/linkerscript/eh-frame-hdr.s b/lld/test/ELF/linkerscript/eh-frame-hdr.s
index a7892b2259e..974ee9bb0a0 100644
--- a/lld/test/ELF/linkerscript/eh-frame-hdr.s
+++ b/lld/test/ELF/linkerscript/eh-frame-hdr.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: echo "SECTIONS { .eh_frame_hdr : {} .eh_frame : {} }" > %t.script
-# RUN: ld.lld -o %t1 --eh-frame-hdr --script %t.script %t
+# RUN: ld.lld -o /dev/null --eh-frame-hdr --script %t.script %t
# RUN: llvm-objdump -s -section=".eh_frame_hdr" %t1 | FileCheck %s
# CHECK: 011b033b 14000000 01000000 4d000000
diff --git a/lld/test/ELF/linkerscript/eh-frame.s b/lld/test/ELF/linkerscript/eh-frame.s
index 5e43ec738f7..a2c8bd389da 100644
--- a/lld/test/ELF/linkerscript/eh-frame.s
+++ b/lld/test/ELF/linkerscript/eh-frame.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: echo "SECTIONS { .eh_frame : { *(.eh_frame) } }" > %t.script
-# RUN: ld.lld -o %t1 --script %t.script %t
+# RUN: ld.lld -o /dev/null --script %t.script %t
# RUN: llvm-objdump -s -section=".eh_frame" %t1 | FileCheck %s
# CHECK: 0000 14000000 00000000 017a5200 01781001
diff --git a/lld/test/ELF/linkerscript/group.s b/lld/test/ELF/linkerscript/group.s
index 53a1c89ebfe..bc9fc12402d 100644
--- a/lld/test/ELF/linkerscript/group.s
+++ b/lld/test/ELF/linkerscript/group.s
@@ -2,7 +2,7 @@
# RUN: mkdir -p %t.dir
# RUN: rm -f %t.dir/libxyz.a
-# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o /dev/null
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
# RUN: %p/Inputs/libsearch-st.s -o %t2.o
# RUN: llvm-ar rcs %t.dir/libxyz.a %t2.o
diff --git a/lld/test/ELF/linkerscript/header-phdr2.s b/lld/test/ELF/linkerscript/header-phdr2.s
index c595a6d3975..fbcd03ff605 100644
--- a/lld/test/ELF/linkerscript/header-phdr2.s
+++ b/lld/test/ELF/linkerscript/header-phdr2.s
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: echo "PHDRS { foobar PT_LOAD FILEHDR PHDRS; }" > %t.script
# RUN: echo "SECTIONS { .text : { *(.text) } : foobar }" >> %t.script
-# RUN: not ld.lld --script %t.script %t.o -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld --script %t.script %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: could not allocate headers
diff --git a/lld/test/ELF/linkerscript/huge-temporary-file.s b/lld/test/ELF/linkerscript/huge-temporary-file.s
index e30153c2885..1b4293bfd7d 100644
--- a/lld/test/ELF/linkerscript/huge-temporary-file.s
+++ b/lld/test/ELF/linkerscript/huge-temporary-file.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: echo "SECTIONS { .text 0x2000 : {. = 0x10 ; *(.text) } }" > %t.script
-# RUN: not ld.lld %t --script %t.script -o %t1
+# RUN: not ld.lld %t --script %t.script -o /dev/null
## This inputs previously created a 4gb temporarily file under 32 bit
## configuration. Issue was fixed. There is no clean way to check that from here.
diff --git a/lld/test/ELF/linkerscript/i386-sections-max-va-overflow.s b/lld/test/ELF/linkerscript/i386-sections-max-va-overflow.s
index 80c4fb5ed7f..d424112a1ce 100644
--- a/lld/test/ELF/linkerscript/i386-sections-max-va-overflow.s
+++ b/lld/test/ELF/linkerscript/i386-sections-max-va-overflow.s
@@ -3,7 +3,7 @@
# RUN: echo "SECTIONS { . = 0xfffffff1;" > %t.script
# RUN: echo " .bar : { *(.bar*) } }" >> %t.script
-# RUN: not ld.lld -o %t.so --script %t.script %t.o 2>&1 | FileCheck %s -check-prefix=ERR
+# RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 | FileCheck %s -check-prefix=ERR
## .bar section has data in [0xfffffff1, 0xfffffff1 + 0x10] == [0xffffff1, 0x1].
## Check we can catch this overflow.
diff --git a/lld/test/ELF/linkerscript/memory2.s b/lld/test/ELF/linkerscript/memory2.s
index 2e7381fb891..7f86ecec29b 100644
--- a/lld/test/ELF/linkerscript/memory2.s
+++ b/lld/test/ELF/linkerscript/memory2.s
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: echo "MEMORY { ram (rwx) : ORIGIN = 0, LENGTH = 2K } \
# RUN: SECTIONS { .text : { *(.text*) } > ram }" > %t.script
-# RUN: ld.lld -o %t2 --script %t.script %t
+# RUN: ld.lld -o /dev/null --script %t.script %t
.text
.global _start
diff --git a/lld/test/ELF/linkerscript/numbers.s b/lld/test/ELF/linkerscript/numbers.s
index 54a189acf53..98d7e336134 100644
--- a/lld/test/ELF/linkerscript/numbers.s
+++ b/lld/test/ELF/linkerscript/numbers.s
@@ -29,12 +29,12 @@
## Mailformed number errors.
# RUN: echo "SECTIONS { . = 0x11h; }" > %t2.script
-# RUN: not ld.lld %t --script %t2.script -o %t3 2>&1 | \
+# RUN: not ld.lld %t --script %t2.script -o /dev/null 2>&1 | \
# RUN: FileCheck --check-prefix=ERR1 %s
# ERR1: malformed number: 0x11h
# RUN: echo "SECTIONS { . = 0x11k; }" > %t3.script
-# RUN: not ld.lld %t --script %t3.script -o %t4 2>&1 | \
+# RUN: not ld.lld %t --script %t3.script -o /dev/null 2>&1 | \
# RUN: FileCheck --check-prefix=ERR2 %s
# ERR2: malformed number: 0x11k
@@ -54,7 +54,7 @@
# ERR5: malformed number: 1zk
# RUN: echo "SECTIONS { . = 1zm; }" > %t7.script
-# RUN: not ld.lld %t --script %t7.script -o %t7 2>&1 | \
+# RUN: not ld.lld %t --script %t7.script -o /dev/null 2>&1 | \
# RUN: FileCheck --check-prefix=ERR6 %s
# ERR6: malformed number: 1zm
diff --git a/lld/test/ELF/linkerscript/output-too-large.s b/lld/test/ELF/linkerscript/output-too-large.s
index 5b9c04a4daa..ca85465036f 100644
--- a/lld/test/ELF/linkerscript/output-too-large.s
+++ b/lld/test/ELF/linkerscript/output-too-large.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %s -o %t.o
# RUN: echo "SECTIONS { .text : { . = 0xffffffff; *(.text*); } }" > %t.script
-# RUN: not ld.lld --no-check-sections --script %t.script %t.o -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld --no-check-sections --script %t.script %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: output file too large
.global _start
diff --git a/lld/test/ELF/linkerscript/pt_gnu_eh_frame.s b/lld/test/ELF/linkerscript/pt_gnu_eh_frame.s
index 81b4c6307d4..7f9ebaa8d8d 100644
--- a/lld/test/ELF/linkerscript/pt_gnu_eh_frame.s
+++ b/lld/test/ELF/linkerscript/pt_gnu_eh_frame.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: echo "SECTIONS { /DISCARD/ : { *(.eh_frame*) *(.eh_frame_hdr*) } }" > %t.script
-# RUN: ld.lld -o %t1 --eh-frame-hdr --script %t.script %t
+# RUN: ld.lld -o /dev/null --eh-frame-hdr --script %t.script %t
.global _start
_start:
diff --git a/lld/test/ELF/linkerscript/searchdir.s b/lld/test/ELF/linkerscript/searchdir.s
index 9fc1a6a49a9..7a921139745 100644
--- a/lld/test/ELF/linkerscript/searchdir.s
+++ b/lld/test/ELF/linkerscript/searchdir.s
@@ -4,9 +4,9 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-freebsd \
# RUN: %p/Inputs/libsearch-dyn.s -o %tdyn.o
# RUN: mkdir -p %t.dir
-# RUN: ld.lld -shared %tdyn.o -o %t.dir/libls.so
+# RUN: ld.lld -shared %tdyn.o -o /dev/null
# RUN: echo "SEARCH_DIR(\"%t.dir\")" > %t.script
-# RUN: ld.lld -o %t2 --script %t.script -lls %t
+# RUN: ld.lld -o /dev/null --script %t.script -lls %t
.globl _start,_bar
_start:
diff --git a/lld/test/ELF/linkerscript/sections-max-va-overflow.s b/lld/test/ELF/linkerscript/sections-max-va-overflow.s
index e8fcd8da94e..ce771b4784c 100644
--- a/lld/test/ELF/linkerscript/sections-max-va-overflow.s
+++ b/lld/test/ELF/linkerscript/sections-max-va-overflow.s
@@ -3,7 +3,7 @@
# RUN: echo "SECTIONS { . = 0xfffffffffffffff1;" > %t.script
# RUN: echo " .bar : { *(.bar*) } }" >> %t.script
-# RUN: not ld.lld -o %t.so --script %t.script %t.o 2>&1 | FileCheck %s -check-prefix=ERR
+# RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 | FileCheck %s -check-prefix=ERR
## .bar section has data in [0xfffffffffffffff1, 0xfffffffffffffff1 + 0x10] ==
## [0xfffffffffffffff1, 0x1]. Check we can catch this overflow.
diff --git a/lld/test/ELF/linkerscript/segment-start.s b/lld/test/ELF/linkerscript/segment-start.s
index 69897d604b3..cb47cb6cd47 100644
--- a/lld/test/ELF/linkerscript/segment-start.s
+++ b/lld/test/ELF/linkerscript/segment-start.s
@@ -22,6 +22,6 @@
.quad foobar4
// RUN: echo "SECTIONS { . = SEGMENT_START(\"foobar\", foo); }" > %t.script
-// RUN: not ld.lld %t.o %t.script -shared -o %t2.so 2>&1 \
+// RUN: not ld.lld %t.o %t.script -shared -o /dev/null 2>&1 \
// RUN: | FileCheck --check-prefix=ERR %s
// ERR: {{.*}}.script:1: symbol not found: foo
diff --git a/lld/test/ELF/linkerscript/subalign.s b/lld/test/ELF/linkerscript/subalign.s
index 1396798c82f..99cb3f19a99 100644
--- a/lld/test/ELF/linkerscript/subalign.s
+++ b/lld/test/ELF/linkerscript/subalign.s
@@ -36,7 +36,7 @@
## Test we fail gracefuly when alignment value is not a power of 2.
# RUN: echo "SECTIONS { .aaa : SUBALIGN(3) { *(.aaa*) } }" > %t5.script
-# RUN: not ld.lld %t1.o --script %t5.script -o %t5 2>&1 | FileCheck -check-prefix=ERR %s
+# RUN: not ld.lld %t1.o --script %t5.script -o /dev/null 2>&1 | FileCheck -check-prefix=ERR %s
# ERR: {{.*}}.script:1: alignment must be power of 2
.global _start
diff --git a/lld/test/ELF/linkerscript/symbol-assignexpr.s b/lld/test/ELF/linkerscript/symbol-assignexpr.s
index 9ab03a173f1..3be7d05931f 100644
--- a/lld/test/ELF/linkerscript/symbol-assignexpr.s
+++ b/lld/test/ELF/linkerscript/symbol-assignexpr.s
@@ -47,7 +47,7 @@
# CHECK-NEXT: 0000000000000001 *ABS* 00000000 symbol15
# RUN: echo "SECTIONS { symbol2 = symbol; }" > %t2.script
-# RUN: not ld.lld -o %t2 --script %t2.script %t 2>&1 \
+# RUN: not ld.lld -o /dev/null --script %t2.script %t 2>&1 \
# RUN: | FileCheck -check-prefix=ERR %s
# ERR: {{.*}}.script:1: symbol not found: symbol
diff --git a/lld/test/ELF/linkerscript/symbol-memoryexpr.s b/lld/test/ELF/linkerscript/symbol-memoryexpr.s
index 9c75274e164..cdd821dc585 100644
--- a/lld/test/ELF/linkerscript/symbol-memoryexpr.s
+++ b/lld/test/ELF/linkerscript/symbol-memoryexpr.s
@@ -23,7 +23,7 @@
# RUN: no_exist_origin = ORIGIN(ram); \
# RUN: no_exist_length = LENGTH(ram); \
# RUN: }" > %t2.script
-# RUN: not ld.lld -o %t2 --script %t2.script %t 2>&1 \
+# RUN: not ld.lld -o /dev/null --script %t2.script %t 2>&1 \
# RUN: | FileCheck -check-prefix=ERR %s
# ERR: {{.*}}.script:1: memory region not defined: ram
diff --git a/lld/test/ELF/linkerscript/symbol-ordering-file.s b/lld/test/ELF/linkerscript/symbol-ordering-file.s
index dd5e0a152ae..ed0495513f9 100644
--- a/lld/test/ELF/linkerscript/symbol-ordering-file.s
+++ b/lld/test/ELF/linkerscript/symbol-ordering-file.s
@@ -2,24 +2,24 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: echo "SECTIONS { .foo : { *(.foo) } }" > %t.script
-# RUN: ld.lld %t.o --script %t.script -o %t.out
+# RUN: ld.lld %t.o --script %t.script -o /dev/null
# RUN: llvm-objdump -s %t.out| FileCheck %s --check-prefix=BEFORE
# BEFORE: Contents of section .foo:
# BEFORE-NEXT: 1122
# RUN: echo "_foo2" > %t.ord
# RUN: echo "_foo1" >> %t.ord
-# RUN: ld.lld --symbol-ordering-file %t.ord %t.o --script %t.script -o %t2.out
+# RUN: ld.lld --symbol-ordering-file %t.ord %t.o --script %t.script -o /dev/null
# RUN: llvm-objdump -s %t2.out| FileCheck %s --check-prefix=AFTER
# AFTER: Contents of section .foo:
# AFTER-NEXT: 2211
# RUN: echo "SECTIONS { .text : { *(.text) } }" > %t2.script
-# RUN: ld.lld --symbol-ordering-file %t.ord %t.o --script %t2.script -o %t3.out
+# RUN: ld.lld --symbol-ordering-file %t.ord %t.o --script %t2.script -o /dev/null
# RUN: llvm-objdump -s %t3.out| FileCheck %s --check-prefix=AFTER
# RUN: echo "SECTIONS { .foo : { BYTE(0x33); *(.foo); BYTE(0x44) } }" > %t3.script
-# RUN: ld.lld --symbol-ordering-file %t.ord %t.o --script %t3.script -o %t4.out
+# RUN: ld.lld --symbol-ordering-file %t.ord %t.o --script %t3.script -o /dev/null
# RUN: llvm-objdump -s %t4.out| FileCheck %s --check-prefix=COMMANDS
# COMMANDS: Contents of section .foo:
# COMMANDS-NEXT: 33221144
diff --git a/lld/test/ELF/llvm33-rela-outside-group.s b/lld/test/ELF/llvm33-rela-outside-group.s
index b5f1b353d9b..1c87817e0c7 100644
--- a/lld/test/ELF/llvm33-rela-outside-group.s
+++ b/lld/test/ELF/llvm33-rela-outside-group.s
@@ -1,7 +1,7 @@
// Input file generated with:
// llvm33/llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %S/Inputs/llvm33-rela-outside-group.o
//
-// RUN: ld.lld -shared %S/Inputs/llvm33-rela-outside-group.o %S/Inputs/llvm33-rela-outside-group.o -o %t
+// RUN: ld.lld -shared %S/Inputs/llvm33-rela-outside-group.o %S/Inputs/llvm33-rela-outside-group.o -o /dev/null
.global bar
.weak _Z3fooIiEvv
diff --git a/lld/test/ELF/lto/data-ordering-lto.s b/lld/test/ELF/lto/data-ordering-lto.s
index bdacccc3540..9c422b7357f 100644
--- a/lld/test/ELF/lto/data-ordering-lto.s
+++ b/lld/test/ELF/lto/data-ordering-lto.s
@@ -7,7 +7,7 @@
# RUN: echo "dipsy " >> %t_order_lto.txt
# RUN: echo "pat " >> %t_order_lto.txt
-# RUN: ld.lld --symbol-ordering-file %t_order_lto.txt %t.o %t.bc -o %t2.out
+# RUN: ld.lld --symbol-ordering-file %t_order_lto.txt %t.o %t.bc -o /dev/null
# RUN: llvm-readelf -t %t2.out| FileCheck %s
# Check that the order is tin -> dipsy -> pat.
diff --git a/lld/test/ELF/lto/symbol-ordering-lto.s b/lld/test/ELF/lto/symbol-ordering-lto.s
index 530b63c669a..3164839cf81 100644
--- a/lld/test/ELF/lto/symbol-ordering-lto.s
+++ b/lld/test/ELF/lto/symbol-ordering-lto.s
@@ -7,7 +7,7 @@
# RUN: echo "_start " >> %t_order_lto.txt
# RUN: echo "pat " >> %t_order_lto.txt
-# RUN: ld.lld --symbol-ordering-file %t_order_lto.txt %t.o %t.bc -o %t2.out
+# RUN: ld.lld --symbol-ordering-file %t_order_lto.txt %t.o %t.bc -o /dev/null
# RUN: llvm-readelf -t %t2.out| FileCheck %s
# Check that the order is tin -> _start -> pat.
diff --git a/lld/test/ELF/map-file-i686.s b/lld/test/ELF/map-file-i686.s
index 1b232e5929d..bab2c4b377e 100644
--- a/lld/test/ELF/map-file-i686.s
+++ b/lld/test/ELF/map-file-i686.s
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=i386-pc-linux %s -o %t1.o
-// RUN: ld.lld %t1.o -o %t1 -M | FileCheck -strict-whitespace %s
+// RUN: ld.lld %t1.o -o /dev/null -M | FileCheck -strict-whitespace %s
.global _start
_start:
diff --git a/lld/test/ELF/map-gc-sections.s b/lld/test/ELF/map-gc-sections.s
index c8ea113ecc6..f69edf591f2 100644
--- a/lld/test/ELF/map-gc-sections.s
+++ b/lld/test/ELF/map-gc-sections.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: ld.lld %t.o -o %t -Map=- --gc-sections | FileCheck %s
+// RUN: ld.lld %t.o -o /dev/null -Map=- --gc-sections | FileCheck %s
.section .tbss,"awT",@nobits
// CHECK-NOT: foo
diff --git a/lld/test/ELF/merge-string-empty.s b/lld/test/ELF/merge-string-empty.s
index 7d0eba80dd2..dc6635c9612 100644
--- a/lld/test/ELF/merge-string-empty.s
+++ b/lld/test/ELF/merge-string-empty.s
@@ -2,7 +2,7 @@
// Ensure that a mergeable string with size 0 does not cause any issue.
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: ld.lld %t.o -o %t
+// RUN: ld.lld %t.o -o /dev/null
.globl _start, s
.section .rodata.str1.1,"aMS",@progbits,1
diff --git a/lld/test/ELF/merge-string-error.s b/lld/test/ELF/merge-string-error.s
index 78895cecca9..70a361b6ccd 100644
--- a/lld/test/ELF/merge-string-error.s
+++ b/lld/test/ELF/merge-string-error.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o -o /dev/null -shared 2>&1 | FileCheck %s
.section .rodata.str1.1,"aMS",@progbits,1
.asciz "abc"
diff --git a/lld/test/ELF/merge-string-no-null.s b/lld/test/ELF/merge-string-no-null.s
index fd3f5073810..ea433fec7d4 100644
--- a/lld/test/ELF/merge-string-no-null.s
+++ b/lld/test/ELF/merge-string-no-null.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o -o /dev/null -shared 2>&1 | FileCheck %s
.section .rodata.str1.1,"aMS",@progbits,1
.ascii "abc"
diff --git a/lld/test/ELF/mips-align-err.s b/lld/test/ELF/mips-align-err.s
index a3bf134e438..8bf01dc5c38 100644
--- a/lld/test/ELF/mips-align-err.s
+++ b/lld/test/ELF/mips-align-err.s
@@ -3,7 +3,7 @@
# RUN: -mcpu=mips32r6
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
# RUN: -mcpu=mips32r6 %S/Inputs/mips-align-err.s -o %t2.o
-# RUN: not ld.lld %t.o %t2.o -o %t.exe 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o %t2.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: {{.*}}:(.text+0x1): improper alignment for relocation R_MIPS_PC16: 0xB is not aligned to 4 bytes
.globl __start
diff --git a/lld/test/ELF/mips-gnu-hash.s b/lld/test/ELF/mips-gnu-hash.s
index 48abbc11f93..e66bc893a07 100644
--- a/lld/test/ELF/mips-gnu-hash.s
+++ b/lld/test/ELF/mips-gnu-hash.s
@@ -2,10 +2,10 @@
# Shouldn't allow the GNU hash style to be selected with the MIPS target.
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t-be.o
-# RUN: not ld.lld -shared -hash-style=gnu %t-be.o -o %t-be.so 2>&1 | FileCheck %s
+# RUN: not ld.lld -shared -hash-style=gnu %t-be.o -o /dev/null 2>&1 | FileCheck %s
# RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux %s -o %t-el.o
-# RUN: not ld.lld -shared -hash-style=gnu %t-el.o -o %t-el.so 2>&1 | FileCheck %s
+# RUN: not ld.lld -shared -hash-style=gnu %t-el.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: the .gnu.hash section is not compatible with the MIPS target.
diff --git a/lld/test/ELF/mips-n32-emul.s b/lld/test/ELF/mips-n32-emul.s
index fde9e365947..3385d512d96 100644
--- a/lld/test/ELF/mips-n32-emul.s
+++ b/lld/test/ELF/mips-n32-emul.s
@@ -3,7 +3,7 @@
# is combined with non-N32 ABI object files.
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
-# RUN: not ld.lld -m elf32btsmipn32 %t.o -o %t.exe 2>&1 | FileCheck %s
+# RUN: not ld.lld -m elf32btsmipn32 %t.o -o /dev/null 2>&1 | FileCheck %s
.text
.global __start
diff --git a/lld/test/ELF/mips-out-of-bounds-call16-reloc.s b/lld/test/ELF/mips-out-of-bounds-call16-reloc.s
index 62f3964f02a..cc2494af594 100644
--- a/lld/test/ELF/mips-out-of-bounds-call16-reloc.s
+++ b/lld/test/ELF/mips-out-of-bounds-call16-reloc.s
@@ -2,7 +2,7 @@
# Check that we create an error on an out-of-bounds R_MIPS_CALL_16
# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t1.o
-# RUN: not ld.lld %t1.o -o %t.exe 2>&1 | FileCheck %s
+# RUN: not ld.lld %t1.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: relocation R_MIPS_CALL16 out of range: 32768 is not in [-32768, 32767]
diff --git a/lld/test/ELF/mips-tls-64-pic-local-variable.s b/lld/test/ELF/mips-tls-64-pic-local-variable.s
index 04d916f42c6..867a56fb043 100644
--- a/lld/test/ELF/mips-tls-64-pic-local-variable.s
+++ b/lld/test/ELF/mips-tls-64-pic-local-variable.s
@@ -18,7 +18,7 @@
# RELOCS-NEXT: 0x20018 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE
# RELOCS-NEXT: }
-# Test case generated using clang -mcpu=mips4 -target mips64-unknown-freebsd12.0 -fpic -O -G0 -EB -mabi=n64 -msoft-float -std=gnu99 -S %s -o %t.s
+# Test case generated using clang -mcpu=mips4 -target mips64-unknown-freebsd12.0 -fpic -O -G0 -EB -mabi=n64 -msoft-float -std=gnu99 -S %s -o /dev/null
# from the following source:
#
# _Thread_local int x;
diff --git a/lld/test/ELF/multiple-cu.s b/lld/test/ELF/multiple-cu.s
index df2b94db856..996a7bcd06d 100644
--- a/lld/test/ELF/multiple-cu.s
+++ b/lld/test/ELF/multiple-cu.s
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/multiple-cu.s -o %t2.o
# RUN: ld.lld -r -o %t.o %t1.o %t2.o
-# RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: undefined symbol: foo
# CHECK-NEXT: referenced by test1.c:2
diff --git a/lld/test/ELF/no-augmentation.s b/lld/test/ELF/no-augmentation.s
index a4306ab7e3d..f4912ba6836 100644
--- a/lld/test/ELF/no-augmentation.s
+++ b/lld/test/ELF/no-augmentation.s
@@ -1,6 +1,6 @@
// REQUIRES: mips
// RUN: llvm-mc -filetype=obj -triple=mips64-unknown-freebsd %s -o %t.o
-// RUN: ld.lld --eh-frame-hdr %t.o -o %t | FileCheck -allow-empty %s
+// RUN: ld.lld --eh-frame-hdr %t.o -o /dev/null | FileCheck -allow-empty %s
// CHECK-NOT: corrupted or unsupported CIE information
// CHECK-NOT: corrupted CIE
diff --git a/lld/test/ELF/no-line-parser-errors-if-empty-section.s b/lld/test/ELF/no-line-parser-errors-if-empty-section.s
index 56b255ef992..808052e7ff0 100644
--- a/lld/test/ELF/no-line-parser-errors-if-empty-section.s
+++ b/lld/test/ELF/no-line-parser-errors-if-empty-section.s
@@ -5,7 +5,7 @@
# it, as that would result in errors from the parser.
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: not ld.lld %t.o -o %t.elf 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK-NOT: warning:
# CHECK-NOT: error:
diff --git a/lld/test/ELF/no-line-parser-errors-if-no-section.s b/lld/test/ELF/no-line-parser-errors-if-no-section.s
index 9210d8514cf..4624601315d 100644
--- a/lld/test/ELF/no-line-parser-errors-if-no-section.s
+++ b/lld/test/ELF/no-line-parser-errors-if-no-section.s
@@ -5,7 +5,7 @@
# it, as that would result in errors from the parser.
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: not ld.lld %t.o -o %t.elf 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK-NOT: warning:
# CHECK-NOT: error:
diff --git a/lld/test/ELF/no-obj.s b/lld/test/ELF/no-obj.s
index 693cdf1e9d3..1a4bf98c181 100644
--- a/lld/test/ELF/no-obj.s
+++ b/lld/test/ELF/no-obj.s
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
// RUN: llvm-ar rcs %t.a %t.o
-// RUN: not ld.lld -o %t2 -u _start %t.a 2>&1 | FileCheck %s
+// RUN: not ld.lld -o /dev/null -u _start %t.a 2>&1 | FileCheck %s
// CHECK: target emulation unknown: -m or at least one .o file required
diff --git a/lld/test/ELF/no-symtab.s b/lld/test/ELF/no-symtab.s
index af9df13e976..2468c4f05fc 100644
--- a/lld/test/ELF/no-symtab.s
+++ b/lld/test/ELF/no-symtab.s
@@ -1,5 +1,5 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: ld.lld %t.o %p/Inputs/no-symtab.o -o %t
+// RUN: ld.lld %t.o %p/Inputs/no-symtab.o -o /dev/null
.global _start
_start:
diff --git a/lld/test/ELF/no-undefined.s b/lld/test/ELF/no-undefined.s
index 493a3898709..854114b6a07 100644
--- a/lld/test/ELF/no-undefined.s
+++ b/lld/test/ELF/no-undefined.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: not ld.lld --no-undefined -shared %t -o %t.so
-# RUN: ld.lld -shared %t -o %t1.so
+# RUN: not ld.lld --no-undefined -shared %t -o /dev/null
+# RUN: ld.lld -shared %t -o /dev/null
.globl _shared
_shared:
diff --git a/lld/test/ELF/oformat-binary.s b/lld/test/ELF/oformat-binary.s
index acd95c7cef3..44c7b5ac2d8 100644
--- a/lld/test/ELF/oformat-binary.s
+++ b/lld/test/ELF/oformat-binary.s
@@ -15,7 +15,7 @@
# RUN: ld.lld -o %t2.out --script %t.script %t --oformat binary
# RUN: od -t x1 -v %t2.out | FileCheck %s
-# RUN: not ld.lld -o %t3.out %t --oformat foo 2>&1 \
+# RUN: not ld.lld -o /dev/null %t --oformat foo 2>&1 \
# RUN: | FileCheck %s --check-prefix ERR
# ERR: unknown --oformat value: foo
diff --git a/lld/test/ELF/ppc64-addr16-error.s b/lld/test/ELF/ppc64-addr16-error.s
index d2580892d70..5ffca587d6e 100644
--- a/lld/test/ELF/ppc64-addr16-error.s
+++ b/lld/test/ELF/ppc64-addr16-error.s
@@ -2,11 +2,11 @@
// RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t
// RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %p/Inputs/ppc64-addr16-error.s -o %t2
-// RUN: not ld.lld -shared %t %t2 -o %t3 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %t %t2 -o /dev/null 2>&1 | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t
// RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/ppc64-addr16-error.s -o %t2
-// RUN: not ld.lld -shared %t %t2 -o %t3 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %t %t2 -o /dev/null 2>&1 | FileCheck %s
.short sym+65539
diff --git a/lld/test/ELF/pr34872.s b/lld/test/ELF/pr34872.s
index 623cf604242..c6ca8197209 100644
--- a/lld/test/ELF/pr34872.s
+++ b/lld/test/ELF/pr34872.s
@@ -3,7 +3,7 @@
# RUN: llvm-mc %p/Inputs/undefined-error.s -filetype=obj \
# RUN: -triple=x86_64-pc-linux -o %t2.o
# RUN: ld.lld -shared %t2.o -o %t2.so
-# RUN: not ld.lld %t2.so %t.o -o %t.out 2>&1 | FileCheck %s
+# RUN: not ld.lld %t2.so %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: undefined symbol: fmod
# Check we're not emitting other diagnostics for this symbol.
diff --git a/lld/test/ELF/relocation-dtrace.test b/lld/test/ELF/relocation-dtrace.test
index ef2cc4956ca..9007a265bfa 100644
--- a/lld/test/ELF/relocation-dtrace.test
+++ b/lld/test/ELF/relocation-dtrace.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj %s -o %t.o
-# RUN: ld.lld -shared %t.o -o %t.so
+# RUN: ld.lld -shared %t.o -o /dev/null
# Test that we can handle R_X86_64_NONE as produced by dtrace.
diff --git a/lld/test/ELF/relocation-nocopy.s b/lld/test/ELF/relocation-nocopy.s
index 533277dc8ec..70e99334796 100644
--- a/lld/test/ELF/relocation-nocopy.s
+++ b/lld/test/ELF/relocation-nocopy.s
@@ -2,7 +2,7 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/relocation-copy.s -o %t2.o
// RUN: ld.lld -shared %t2.o -o %t.so
-// RUN: not ld.lld -z nocopyreloc %t.o %t.so -o %t3 2>&1 | FileCheck %s
+// RUN: not ld.lld -z nocopyreloc %t.o %t.so -o /dev/null 2>&1 | FileCheck %s
// CHECK: unresolvable relocation R_X86_64_32S against symbol 'x'
// CHECK: unresolvable relocation R_X86_64_32S against symbol 'y'
diff --git a/lld/test/ELF/relocation-none-aarch64.test b/lld/test/ELF/relocation-none-aarch64.test
index dd67c8c0fb2..e77989a54a8 100644
--- a/lld/test/ELF/relocation-none-aarch64.test
+++ b/lld/test/ELF/relocation-none-aarch64.test
@@ -1,7 +1,7 @@
# REQUIRES: aarch64
# RUN: yaml2obj %s -o %t.o
-# RUN: ld.lld %t.o -o %t.out
+# RUN: ld.lld %t.o -o /dev/null
!ELF
FileHeader:
diff --git a/lld/test/ELF/relocation-none-i686.test b/lld/test/ELF/relocation-none-i686.test
index d8eed8f7a12..82dc4e608c0 100644
--- a/lld/test/ELF/relocation-none-i686.test
+++ b/lld/test/ELF/relocation-none-i686.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj %s -o %t.o
-# RUN: ld.lld %t.o -o %t.out
+# RUN: ld.lld %t.o -o /dev/null
# Test that we can handle R_386_NONE.
diff --git a/lld/test/ELF/relocation-past-merge-end.s b/lld/test/ELF/relocation-past-merge-end.s
index d08bde7b9f6..a3e7b59a415 100644
--- a/lld/test/ELF/relocation-past-merge-end.s
+++ b/lld/test/ELF/relocation-past-merge-end.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
-// RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o -o /dev/null -shared 2>&1 | FileCheck %s
// CHECK: relocation-past-merge-end.s.tmp.o:(.foo): entry is past the end of the section
.data
diff --git a/lld/test/ELF/relocation-relative-absolute.s b/lld/test/ELF/relocation-relative-absolute.s
index 2a343fddca7..21f50025e92 100644
--- a/lld/test/ELF/relocation-relative-absolute.s
+++ b/lld/test/ELF/relocation-relative-absolute.s
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %tinput1.o
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux \
# RUN: %S/Inputs/relocation-relative-absolute.s -o %tinput2.o
-# RUN: not ld.lld %tinput1.o %tinput2.o -o %t -pie 2>&1 | FileCheck %s
+# RUN: not ld.lld %tinput1.o %tinput2.o -o /dev/null -pie 2>&1 | FileCheck %s
.globl _start
_start:
diff --git a/lld/test/ELF/relocation-size-err.s b/lld/test/ELF/relocation-size-err.s
index 763ad875ebd..8783fe9568d 100644
--- a/lld/test/ELF/relocation-size-err.s
+++ b/lld/test/ELF/relocation-size-err.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o -o /dev/null -shared 2>&1 | FileCheck %s
// CHECK: error: can't create dynamic relocation R_X86_64_SIZE64 against symbol: foo in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
diff --git a/lld/test/ELF/relro-script.s b/lld/test/ELF/relro-script.s
index f0dca67a342..c71c8e5decd 100644
--- a/lld/test/ELF/relro-script.s
+++ b/lld/test/ELF/relro-script.s
@@ -16,7 +16,7 @@
// RUN: .got.plt : { *(.got.plt) } \
// RUN: } " > %t.script
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t3.o
-// RUN: ld.lld %t3.o %t.so -o %t --script=%t.script --print-map | FileCheck %s
+// RUN: ld.lld %t3.o %t.so -o /dev/null --script=%t.script --print-map | FileCheck %s
// CHECK: .data.rel.ro
// CHECK-NEXT: <internal>:(.bss.rel.ro)
diff --git a/lld/test/ELF/section-align-0.test b/lld/test/ELF/section-align-0.test
index 35783f5a894..8827ecf740b 100644
--- a/lld/test/ELF/section-align-0.test
+++ b/lld/test/ELF/section-align-0.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj %s -o %t
-# RUN: ld.lld %t -o %tout
+# RUN: ld.lld %t -o /dev/null
# Verify that lld can handle sections with an alignment of zero.
diff --git a/lld/test/ELF/section-metadata-err.s b/lld/test/ELF/section-metadata-err.s
index ba102be6fb0..c9104303e43 100644
--- a/lld/test/ELF/section-metadata-err.s
+++ b/lld/test/ELF/section-metadata-err.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: a section .bar with SHF_LINK_ORDER should not refer a non-regular section: {{.*}}section-metadata-err.s.tmp.o:(.foo)
diff --git a/lld/test/ELF/section-metadata-err2.s b/lld/test/ELF/section-metadata-err2.s
index b2b611f1600..3191c1f4d3b 100644
--- a/lld/test/ELF/section-metadata-err2.s
+++ b/lld/test/ELF/section-metadata-err2.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
## Check we do not crash and report proper errors.
# CHECK: error: a section .bar with SHF_LINK_ORDER should not refer a non-regular section: {{.*}}section-metadata-err2.s.tmp.o:(.foo)
diff --git a/lld/test/ELF/section-metadata-err3.s b/lld/test/ELF/section-metadata-err3.s
index 36666bf6c21..5c4875b9da5 100644
--- a/lld/test/ELF/section-metadata-err3.s
+++ b/lld/test/ELF/section-metadata-err3.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: incompatible section flags for .bar
# CHECK-NEXT: >>> {{.*}}section-metadata-err3.s.tmp.o:(.bar): 0x2
diff --git a/lld/test/ELF/section-symbols.test b/lld/test/ELF/section-symbols.test
index 2ef77a828b6..973b1102fdf 100644
--- a/lld/test/ELF/section-symbols.test
+++ b/lld/test/ELF/section-symbols.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj %s -o %t
-# RUN: ld.lld -shared %t -o %tout
+# RUN: ld.lld -shared %t -o /dev/null
# Verify that lld can handle STT_SECTION symbols associated
# with SHT_REL[A]/SHT_SYMTAB/SHT_STRTAB sections.
diff --git a/lld/test/ELF/sectionstart.s b/lld/test/ELF/sectionstart.s
index 7d2b65d1c52..be8b5f0cfb4 100644
--- a/lld/test/ELF/sectionstart.s
+++ b/lld/test/ELF/sectionstart.s
@@ -35,11 +35,11 @@
# RUN: llvm-objdump -section-headers %t4 | FileCheck %s
## Errors:
-# RUN: not ld.lld %t.o --section-start .text100000 -o %t2 2>&1 \
+# RUN: not ld.lld %t.o --section-start .text100000 -o /dev/null 2>&1 \
# RUN: | FileCheck -check-prefix=ERR1 %s
# ERR1: invalid argument: --section-start .text100000
-# RUN: not ld.lld %t.o --section-start .text=1Q0000 -o %t3 2>&1 \
+# RUN: not ld.lld %t.o --section-start .text=1Q0000 -o /dev/null 2>&1 \
# RUN: | FileCheck -check-prefix=ERR2 %s
# ERR2: invalid argument: --section-start .text=1Q0000
diff --git a/lld/test/ELF/splitstacks.s b/lld/test/ELF/splitstacks.s
index 3b7e67e5c2b..2c72b16264e 100644
--- a/lld/test/ELF/splitstacks.s
+++ b/lld/test/ELF/splitstacks.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
-# RUN: not ld.lld %t1.o -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld %t1.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: .o: object file compiled with -fsplit-stack is not supported
.globl _start
diff --git a/lld/test/ELF/symbol-ordering-file.s b/lld/test/ELF/symbol-ordering-file.s
index 34d67701933..7979b414809 100644
--- a/lld/test/ELF/symbol-ordering-file.s
+++ b/lld/test/ELF/symbol-ordering-file.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: ld.lld %t.o -o %t.out
+# RUN: ld.lld %t.o -o /dev/null
# RUN: llvm-objdump -s %t.out| FileCheck %s --check-prefix=BEFORE
# BEFORE: Contents of section .foo:
diff --git a/lld/test/ELF/symver-archive.s b/lld/test/ELF/symver-archive.s
index be50503a3f5..3e22dd24b66 100644
--- a/lld/test/ELF/symver-archive.s
+++ b/lld/test/ELF/symver-archive.s
@@ -4,7 +4,7 @@
# RUN: llvm-ar rcs %t.a %t1
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/symver-archive1.s -o %t2.o
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/symver-archive2.s -o %t3.o
-# RUN: ld.lld -o %t.out %t2.o %t3.o %t.a
+# RUN: ld.lld -o /dev/null %t2.o %t3.o %t.a
.text
.globl x
diff --git a/lld/test/ELF/tls-archive.s b/lld/test/ELF/tls-archive.s
index 9a88fddffd3..640e68ac3a7 100644
--- a/lld/test/ELF/tls-archive.s
+++ b/lld/test/ELF/tls-archive.s
@@ -3,7 +3,7 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/tls-mismatch.s -o %t2
// RUN: rm -f %t.a
// RUN: llvm-ar cru %t.a %t2
-// RUN: ld.lld %t.a %t -o %t3
+// RUN: ld.lld %t.a %t -o /dev/null
.globl _start,tlsvar
_start:
diff --git a/lld/test/ELF/tls-error.s b/lld/test/ELF/tls-error.s
index b6178990104..989a63eb709 100644
--- a/lld/test/ELF/tls-error.s
+++ b/lld/test/ELF/tls-error.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-// RUN: not ld.lld %t -o %tout 2>&1 | FileCheck %s
+// RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck %s
// CHECK: R_X86_64_TPOFF32 out of range
.global _start
diff --git a/lld/test/ELF/tls-in-archive.s b/lld/test/ELF/tls-in-archive.s
index 71f60e380f3..ac1b4cc11ea 100644
--- a/lld/test/ELF/tls-in-archive.s
+++ b/lld/test/ELF/tls-in-archive.s
@@ -2,7 +2,7 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/tls-in-archive.s -o %t1.o
// RUN: llvm-ar cru %t.a %t1.o
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t2.o
-// RUN: ld.lld %t2.o %t.a -o %tout
+// RUN: ld.lld %t2.o %t.a -o /dev/null
.globl _start
_start:
diff --git a/lld/test/ELF/tls-mismatch.s b/lld/test/ELF/tls-mismatch.s
index 21994d19af3..d7ce224c1fb 100644
--- a/lld/test/ELF/tls-mismatch.s
+++ b/lld/test/ELF/tls-mismatch.s
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/tls-mismatch.s -o %t2
-// RUN: not ld.lld %t %t2 -o %t3 2>&1 | FileCheck %s
+// RUN: not ld.lld %t %t2 -o /dev/null 2>&1 | FileCheck %s
// CHECK: TLS attribute mismatch: tlsvar
// CHECK: >>> defined in
diff --git a/lld/test/ELF/trace-symbols.s b/lld/test/ELF/trace-symbols.s
index f9452bc5cf8..6f8436a847f 100644
--- a/lld/test/ELF/trace-symbols.s
+++ b/lld/test/ELF/trace-symbols.s
@@ -29,7 +29,7 @@
# RUN: ld.lld -y foo -trace-symbol=common -trace-symbol=hsymbol \
# RUN: %t %t1 %t2 -o %t3 2>&1 | FileCheck -check-prefix=OBJECTD2FOO %s
# RUN: ld.lld -y foo -y common --trace-symbol=hsymbol \
-# RUN: %t %t2 %t1 -o %t4 2>&1 | FileCheck -check-prefix=OBJECTD2FOO %s
+# RUN: %t %t2 %t1 -o /dev/null 2>&1 | FileCheck -check-prefix=OBJECTD2FOO %s
# RUN: ld.lld -y foo -y common %t %t1.so %t2 -o %t3 2>&1 | \
# RUN: FileCheck -check-prefix=OBJECTD2FOO %s
# OBJECTD2FOO: trace-symbols.s.tmp2: definition of foo
diff --git a/lld/test/ELF/typed-undef.s b/lld/test/ELF/typed-undef.s
index d00e07f8251..879a80975bc 100644
--- a/lld/test/ELF/typed-undef.s
+++ b/lld/test/ELF/typed-undef.s
@@ -3,7 +3,7 @@
# We used to crash on this, check that we don't
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: ld.lld %t.o -o %t -pie --unresolved-symbols=ignore-all
+# RUN: ld.lld %t.o -o /dev/null -pie --unresolved-symbols=ignore-all
.global _start
_start:
diff --git a/lld/test/ELF/undef-broken-debug.test b/lld/test/ELF/undef-broken-debug.test
index 4a61bce3f24..b93d399f36c 100644
--- a/lld/test/ELF/undef-broken-debug.test
+++ b/lld/test/ELF/undef-broken-debug.test
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: yaml2obj %s -o %t.o
-# RUN: not ld.lld %t.o -o %t.exe 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
# The debug info has a broken relocation. Check that we don't crash
# and still report the undefined symbol.
diff --git a/lld/test/ELF/undef-shared.s b/lld/test/ELF/undef-shared.s
index 11e241c301b..701f70ea94e 100644
--- a/lld/test/ELF/undef-shared.s
+++ b/lld/test/ELF/undef-shared.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o -o /dev/null -shared 2>&1 | FileCheck %s
# CHECK: error: undefined symbol: hidden
# CHECK: >>> referenced by {{.*}}:(.data+0x0)
diff --git a/lld/test/ELF/undef-start.s b/lld/test/ELF/undef-start.s
index d0e014721d2..5c591bf70d5 100644
--- a/lld/test/ELF/undef-start.s
+++ b/lld/test/ELF/undef-start.s
@@ -1,5 +1,5 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: ld.lld %t.o -o %t 2>&1 | FileCheck %s
+# RUN: ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: warning: cannot find entry symbol _start
diff --git a/lld/test/ELF/unresolved-symbols.s b/lld/test/ELF/unresolved-symbols.s
index 97ecd5014b1..69da3e63c6d 100644
--- a/lld/test/ELF/unresolved-symbols.s
+++ b/lld/test/ELF/unresolved-symbols.s
@@ -21,7 +21,7 @@
## case when --no-undefined specified.
# RUN: ld.lld %t2.o -o %t1_1 --unresolved-symbols=ignore-all
# RUN: llvm-readobj %t1_1 > /dev/null 2>&1
-# RUN: not ld.lld %t2.o -o %t1_2 --unresolved-symbols=ignore-all --no-undefined 2>&1 | \
+# RUN: not ld.lld %t2.o -o /dev/null --unresolved-symbols=ignore-all --no-undefined 2>&1 | \
# RUN: FileCheck -check-prefix=ERRUND %s
# ERRUND: error: undefined symbol: undef
# ERRUND: >>> referenced by {{.*}}:(.text+0x1)
@@ -34,11 +34,11 @@
# RUN: ld.lld %t1.o %t2.o -o %t2 --unresolved-symbols=ignore-in-object-files
# RUN: llvm-readobj %t2 > /dev/null 2>&1
## And still should not should produce for undefines from DSOs.
-# RUN: ld.lld %t1.o %t.so -o %t2_1 --unresolved-symbols=ignore-in-object-files
+# RUN: ld.lld %t1.o %t.so -o /dev/null --unresolved-symbols=ignore-in-object-files
# RUN: llvm-readobj %t2 > /dev/null 2>&1
## Ignoring undefines in shared should produce error for symbol from object.
-# RUN: not ld.lld %t2.o -o %t3 --unresolved-symbols=ignore-in-shared-libs 2>&1 | \
+# RUN: not ld.lld %t2.o -o /dev/null --unresolved-symbols=ignore-in-shared-libs 2>&1 | \
# RUN: FileCheck -check-prefix=ERRUND %s
## And should not produce errors for symbols from DSO.
# RUN: ld.lld %t1.o %t.so -o %t3_1 --unresolved-symbols=ignore-in-shared-libs
@@ -60,9 +60,9 @@
# RUN: llvm-readobj %t6 > /dev/null 2>&1
# RUN: ld.lld -shared %t1.o %t.so -o %t6_1
# RUN: llvm-readobj %t6_1 > /dev/null 2>&1
-# RUN: not ld.lld %t2.o -o %t7 --unresolved-symbols=report-all 2>&1 | \
+# RUN: not ld.lld %t2.o -o /dev/null --unresolved-symbols=report-all 2>&1 | \
# RUN: FileCheck -check-prefix=ERRUND %s
-# RUN: not ld.lld %t2.o -o %t7_1 2>&1 | FileCheck -check-prefix=ERRUND %s
+# RUN: not ld.lld %t2.o -o /dev/null 2>&1 | FileCheck -check-prefix=ERRUND %s
.globl _start
_start:
diff --git a/lld/test/ELF/user_def_init_array_start.s b/lld/test/ELF/user_def_init_array_start.s
index 581dd27e460..a06dbd84ea4 100644
--- a/lld/test/ELF/user_def_init_array_start.s
+++ b/lld/test/ELF/user_def_init_array_start.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-// RUN: ld.lld %t.o -o %t2.so -shared
+// RUN: ld.lld %t.o -o /dev/null -shared
// Allow user defined __init_array_start. This is used by musl because of the
// the bfd linker not handling these properly. We always create them as
// hidden, musl should not have problems with lld.
diff --git a/lld/test/ELF/verneed-local.s b/lld/test/ELF/verneed-local.s
index 208d8ecf8f6..d779a48c024 100644
--- a/lld/test/ELF/verneed-local.s
+++ b/lld/test/ELF/verneed-local.s
@@ -4,7 +4,7 @@
# RUN: ld.lld -shared %t1.o --version-script %t.script -o %t.so
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: not ld.lld %t.o %t.so -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o %t.so -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: undefined symbol: f3
# CHECK: >>> referenced by {{.*}}:(.text+0x1)
diff --git a/lld/test/ELF/version-script-complex-wildcards.s b/lld/test/ELF/version-script-complex-wildcards.s
index 61e1069e2ea..ce001d0b76c 100644
--- a/lld/test/ELF/version-script-complex-wildcards.s
+++ b/lld/test/ELF/version-script-complex-wildcards.s
@@ -46,7 +46,7 @@
# RUN: llvm-readobj -V %t8.so | FileCheck %s --check-prefix=ABBABC
# RUN: echo "FOO { global: extern \"C++\" { a[; }; };" > %t9.script
-# RUN: not ld.lld --version-script %t9.script -shared %t.o -o %t9.so 2>&1 \
+# RUN: not ld.lld --version-script %t9.script -shared %t.o -o /dev/null 2>&1 \
# RUN: | FileCheck %s --check-prefix=ERROR
# ERROR: invalid glob pattern: a[
diff --git a/lld/test/ELF/version-script-glob.s b/lld/test/ELF/version-script-glob.s
index 8149ead8292..d9ead0503d6 100644
--- a/lld/test/ELF/version-script-glob.s
+++ b/lld/test/ELF/version-script-glob.s
@@ -48,7 +48,7 @@ local:
# CHECK-NEXT: ]
# RUN: echo "{ global : local; local: *; };" > %t1.script
-# RUN: ld.lld -shared --version-script %t1.script %t.o -o %t1.so
+# RUN: ld.lld -shared --version-script %t1.script %t.o -o /dev/null
# LOCAL: DynamicSymbols [
# LOCAL-NEXT: Symbol {
diff --git a/lld/test/ELF/version-script-missing.s b/lld/test/ELF/version-script-missing.s
index ad4786e70cc..a82a37e4127 100644
--- a/lld/test/ELF/version-script-missing.s
+++ b/lld/test/ELF/version-script-missing.s
@@ -4,4 +4,4 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: echo "{ foobar; };" > %t.script
-# RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
+# RUN: ld.lld --version-script %t.script -shared %t.o -o /dev/null
diff --git a/lld/test/ELF/version-script-no-warn.s b/lld/test/ELF/version-script-no-warn.s
index d5ff4b58fbf..d99b87bf937 100644
--- a/lld/test/ELF/version-script-no-warn.s
+++ b/lld/test/ELF/version-script-no-warn.s
@@ -5,7 +5,7 @@
# RUN: ld.lld -shared %t2.o -soname shared -o %t2.so
# RUN: echo "foo { global: bar; local: *; };" > %t.script
-# RUN: ld.lld --fatal-warnings --shared --version-script %t.script %t.o %t2.so -o %t.out
+# RUN: ld.lld --fatal-warnings --shared --version-script %t.script %t.o %t2.so -o /dev/null
.global bar
bar:
diff --git a/lld/test/ELF/version-script-no-warn2.s b/lld/test/ELF/version-script-no-warn2.s
index 60049639d26..795fbb0b4f2 100644
--- a/lld/test/ELF/version-script-no-warn2.s
+++ b/lld/test/ELF/version-script-no-warn2.s
@@ -3,7 +3,7 @@
# RUN: ld.lld %t1.o -o %t1.so -shared
# RUN: echo "{ global: foo; local: *; };" > %t.script
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t2.o
-# RUN: ld.lld -shared --version-script %t.script %t2.o %t1.so -o %t2.so --fatal-warnings
+# RUN: ld.lld -shared --version-script %t.script %t2.o %t1.so -o /dev/null --fatal-warnings
.global foo
foo:
diff --git a/lld/test/ELF/version-script-symver.s b/lld/test/ELF/version-script-symver.s
index 0a4eddd46ce..b6355949fad 100644
--- a/lld/test/ELF/version-script-symver.s
+++ b/lld/test/ELF/version-script-symver.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: ld.lld %t.o -o %t
+# RUN: ld.lld %t.o -o /dev/null
.global _start
.global bar
diff --git a/lld/test/ELF/version-script.s b/lld/test/ELF/version-script.s
index 36942c12e6c..75083ac9a76 100644
--- a/lld/test/ELF/version-script.s
+++ b/lld/test/ELF/version-script.s
@@ -34,7 +34,7 @@
# RUN: echo "VERSION_1.0 { global: foo1; local: *; };" > %t6.script
# RUN: echo "VERSION_2.0 { global: foo1; local: *; };" >> %t6.script
-# RUN: not ld.lld --version-script %t6.script -shared %t.o %t2.so -o %t6.so 2>&1 | \
+# RUN: not ld.lld --version-script %t6.script -shared %t.o %t2.so -o /dev/null 2>&1 | \
# RUN: FileCheck -check-prefix=ERR3 %s
# ERR3: duplicate symbol 'foo1' in version script
@@ -214,7 +214,7 @@
# ALL-NEXT: ]
# RUN: echo "VERSION_1.0 { global: foo1; foo1; local: *; };" > %t8.script
-# RUN: ld.lld --version-script %t8.script -shared %t.o -o %t8.so --fatal-warnings
+# RUN: ld.lld --version-script %t8.script -shared %t.o -o /dev/null --fatal-warnings
.globl foo1
foo1:
diff --git a/lld/test/ELF/version-symbol-error.s b/lld/test/ELF/version-symbol-error.s
index fb83b359485..f916fe7b34f 100644
--- a/lld/test/ELF/version-symbol-error.s
+++ b/lld/test/ELF/version-symbol-error.s
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
// RUN: echo "V1 {};" > %t.script
-// RUN: not ld.lld -shared -version-script=%t.script %t.o -o %t.so 2>&1 \
+// RUN: not ld.lld -shared -version-script=%t.script %t.o -o /dev/null 2>&1 \
// RUN: | FileCheck %s
// CHECK: .o: symbol foo@V2 has undefined version V2
diff --git a/lld/test/ELF/version-undef-sym.s b/lld/test/ELF/version-undef-sym.s
index 20e92e61f64..13a6dc41fd1 100644
--- a/lld/test/ELF/version-undef-sym.s
+++ b/lld/test/ELF/version-undef-sym.s
@@ -35,7 +35,7 @@
// CHECK: Name: bar
// But now we can successfully find bar.
-// RUN: ld.lld %t.o %p/Inputs/version-undef-sym.so -o %t.exe
+// RUN: ld.lld %t.o %p/Inputs/version-undef-sym.so -o /dev/null
.global _start
_start:
diff --git a/lld/test/ELF/warn-backrefs.s b/lld/test/ELF/warn-backrefs.s
index d51e1f5410a..28937e199ca 100644
--- a/lld/test/ELF/warn-backrefs.s
+++ b/lld/test/ELF/warn-backrefs.s
@@ -37,11 +37,11 @@
# RUN: echo ".globl bar; bar:" | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t3.o
# RUN: echo ".globl foo; foo: call bar" | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t4.o
-# RUN: ld.lld --fatal-warnings --warn-backrefs %t1.o --start-lib %t3.o %t4.o --end-lib -o %t.exe
+# RUN: ld.lld --fatal-warnings --warn-backrefs %t1.o --start-lib %t3.o %t4.o --end-lib -o /dev/null
# We don't report backward references to weak symbols as they can be overriden later.
# RUN: echo ".weak foo; foo:" | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t5.o
-# RUN: ld.lld --fatal-warnings --warn-backrefs --start-lib %t5.o --end-lib %t1.o %t2.o -o %t.exe
+# RUN: ld.lld --fatal-warnings --warn-backrefs --start-lib %t5.o --end-lib %t1.o %t2.o -o /dev/null
.globl _start, foo
_start:
diff --git a/lld/test/ELF/warn-unresolved-symbols-hidden.s b/lld/test/ELF/warn-unresolved-symbols-hidden.s
index 04691f9af94..9e3d9e15210 100644
--- a/lld/test/ELF/warn-unresolved-symbols-hidden.s
+++ b/lld/test/ELF/warn-unresolved-symbols-hidden.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: not ld.lld -shared %t.o -o %t.so -z defs --warn-unresolved-symbols 2>&1| FileCheck %s
+# RUN: not ld.lld -shared %t.o -o /dev/null -z defs --warn-unresolved-symbols 2>&1| FileCheck %s
# CHECK: warning: undefined symbol: foo
# CHECK: error: undefined symbol: bar
diff --git a/lld/test/ELF/warn-unresolved-symbols.s b/lld/test/ELF/warn-unresolved-symbols.s
index 3342c6ce50a..608b3558029 100644
--- a/lld/test/ELF/warn-unresolved-symbols.s
+++ b/lld/test/ELF/warn-unresolved-symbols.s
@@ -2,11 +2,11 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
## The link should fail with an undef error by default
-# RUN: not ld.lld %t1.o -o %t3 2>&1 | \
+# RUN: not ld.lld %t1.o -o /dev/null 2>&1 | \
# RUN: FileCheck -check-prefix=ERRUND %s
## --error-unresolved-symbols should generate an error
-# RUN: not ld.lld %t1.o -o %t4 --error-unresolved-symbols 2>&1 | \
+# RUN: not ld.lld %t1.o -o /dev/null --error-unresolved-symbols 2>&1 | \
# RUN: FileCheck -check-prefix=ERRUND %s
## --warn-unresolved-symbols should generate a warning
@@ -16,19 +16,19 @@
## Test that the last option wins
# RUN: ld.lld %t1.o -o %t5 --error-unresolved-symbols --warn-unresolved-symbols 2>&1 | \
# RUN: FileCheck -check-prefix=WARNUND %s
-# RUN: not ld.lld %t1.o -o %t6 --warn-unresolved-symbols --error-unresolved-symbols 2>&1 | \
+# RUN: not ld.lld %t1.o -o /dev/null --warn-unresolved-symbols --error-unresolved-symbols 2>&1 | \
# RUN: FileCheck -check-prefix=ERRUND %s
## Do not report undefines if linking relocatable or shared.
## And while we're at it, check that we can accept single -
## variants of these options.
-# RUN: ld.lld -r %t1.o -o %t7 -error-unresolved-symbols 2>&1 | \
+# RUN: ld.lld -r %t1.o -o /dev/null -error-unresolved-symbols 2>&1 | \
# RUN: FileCheck -allow-empty -check-prefix=NOERR %s
-# RUN: ld.lld -shared %t1.o -o %t8.so --error-unresolved-symbols 2>&1 | \
+# RUN: ld.lld -shared %t1.o -o /dev/null --error-unresolved-symbols 2>&1 | \
# RUN: FileCheck -allow-empty -check-prefix=NOERR %s
-# RUN: ld.lld -r %t1.o -o %t9 -warn-unresolved-symbols 2>&1 | \
+# RUN: ld.lld -r %t1.o -o /dev/null -warn-unresolved-symbols 2>&1 | \
# RUN: FileCheck -allow-empty -check-prefix=NOWARN %s
-# RUN: ld.lld -shared %t1.o -o %t10.so --warn-unresolved-symbols 2>&1 | \
+# RUN: ld.lld -shared %t1.o -o /dev/null --warn-unresolved-symbols 2>&1 | \
# RUN: FileCheck -allow-empty -check-prefix=NOWARN %s
# ERRUND: error: undefined symbol: undef
diff --git a/lld/test/ELF/weak-undef-lazy.s b/lld/test/ELF/weak-undef-lazy.s
index 113013ea2e0..0a4188fca27 100644
--- a/lld/test/ELF/weak-undef-lazy.s
+++ b/lld/test/ELF/weak-undef-lazy.s
@@ -3,7 +3,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/weak-undef-lazy.s -o %t2.o
# RUN: rm -f %t2.a
# RUN: llvm-ar rc %t2.a %t2.o
-# RUN: ld.lld %t.o %t2.a -o %t --export-dynamic
+# RUN: ld.lld %t.o %t2.a -o /dev/null --export-dynamic
.global _start
_start:
diff --git a/lld/test/ELF/whole-archive-name.s b/lld/test/ELF/whole-archive-name.s
index 7b7d7e82592..1cf7962e62f 100644
--- a/lld/test/ELF/whole-archive-name.s
+++ b/lld/test/ELF/whole-archive-name.s
@@ -3,7 +3,7 @@
// RUN: mkdir -p %t.dir
// RUN: rm -f %t.dir/liba.a
// RUN: llvm-ar rcs %t.dir/liba.a %t.o
-// RUN: ld.lld -L%t.dir --whole-archive -la -o %t -Map=- | FileCheck %s
+// RUN: ld.lld -L%t.dir --whole-archive -la -o /dev/null -Map=- | FileCheck %s
.globl _start
_start:
diff --git a/lld/test/ELF/writable-merge.s b/lld/test/ELF/writable-merge.s
index 3006fa387fb..91a7e07d7ce 100644
--- a/lld/test/ELF/writable-merge.s
+++ b/lld/test/ELF/writable-merge.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
-// RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
// CHECK: writable SHF_MERGE section is not supported
.section .foo,"awM",@progbits,4
diff --git a/lld/test/ELF/x86-64-dyn-rel-error2.s b/lld/test/ELF/x86-64-dyn-rel-error2.s
index 9980b47d840..b3259395d24 100644
--- a/lld/test/ELF/x86-64-dyn-rel-error2.s
+++ b/lld/test/ELF/x86-64-dyn-rel-error2.s
@@ -2,7 +2,7 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/shared.s -o %t2.o
// RUN: ld.lld %t2.o -shared -o %t2.so
-// RUN: not ld.lld -shared %t.o %t2.so -o %t 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %t.o %t2.so -o /dev/null 2>&1 | FileCheck %s
// CHECK: relocation R_X86_64_PC32 cannot be used against symbol zed; recompile with -fPIC
// CHECK: >>> defined in {{.*}}.so
diff --git a/lld/test/ELF/x86-64-dyn-rel-error3.s b/lld/test/ELF/x86-64-dyn-rel-error3.s
index 82a580d6b04..86cef1426df 100644
--- a/lld/test/ELF/x86-64-dyn-rel-error3.s
+++ b/lld/test/ELF/x86-64-dyn-rel-error3.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: not ld.lld %t.o -shared -o %t.so 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o -shared -o /dev/null 2>&1 | FileCheck %s
# CHECK: relocation R_X86_64_8 cannot be used against symbol foo; recompile with -fPIC
# CHECK: relocation R_X86_64_16 cannot be used against symbol foo; recompile with -fPIC
diff --git a/lld/test/ELF/x86-64-reloc-16.s b/lld/test/ELF/x86-64-reloc-16.s
index 4822ec71757..5157c3706fe 100644
--- a/lld/test/ELF/x86-64-reloc-16.s
+++ b/lld/test/ELF/x86-64-reloc-16.s
@@ -3,12 +3,12 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/x86-64-reloc-16.s -o %t1
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/x86-64-reloc-16-error.s -o %t2
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-// RUN: ld.lld -shared %t %t1 -o %t3
+// RUN: ld.lld -shared %t %t1 -o /dev/null
// CHECK: Contents of section .text:
// CHECK-NEXT: 200000 42
-// RUN: not ld.lld -shared %t %t2 -o %t4 2>&1 | FileCheck --check-prefix=ERROR %s
+// RUN: not ld.lld -shared %t %t2 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR %s
// ERROR: relocation R_X86_64_16 out of range: 65536 is not in [0, 65535]
.short foo
diff --git a/lld/test/ELF/x86-64-reloc-32-fpic.s b/lld/test/ELF/x86-64-reloc-32-fpic.s
index b5f11e5fa4c..1c4754f1e2c 100644
--- a/lld/test/ELF/x86-64-reloc-32-fpic.s
+++ b/lld/test/ELF/x86-64-reloc-32-fpic.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
+# RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: relocation R_X86_64_32 cannot be used against symbol _shared; recompile with -fPIC
# CHECK: >>> defined in {{.*}}
diff --git a/lld/test/ELF/x86-64-reloc-8.s b/lld/test/ELF/x86-64-reloc-8.s
index 8f6ba5aa14b..f71bafb7ffb 100644
--- a/lld/test/ELF/x86-64-reloc-8.s
+++ b/lld/test/ELF/x86-64-reloc-8.s
@@ -3,12 +3,12 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/x86-64-reloc-8.s -o %t1
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/x86-64-reloc-8-error.s -o %t2
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-// RUN: ld.lld -shared %t %t1 -o %t3
+// RUN: ld.lld -shared %t %t1 -o /dev/null
// CHECK: Contents of section .text:
// CHECK-NEXT: 200000 42
-// RUN: not ld.lld -shared %t %t2 -o %t4 2>&1 | FileCheck --check-prefix=ERROR %s
+// RUN: not ld.lld -shared %t %t2 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR %s
// ERROR: relocation R_X86_64_8 out of range: 256 is not in [0, 255]
.byte foo
diff --git a/lld/test/ELF/x86-64-reloc-debug-overflow.s b/lld/test/ELF/x86-64-reloc-debug-overflow.s
index 364c3bf3133..d6e6650acd3 100644
--- a/lld/test/ELF/x86-64-reloc-debug-overflow.s
+++ b/lld/test/ELF/x86-64-reloc-debug-overflow.s
@@ -1,7 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/x86-64-reloc-error.s -o %tabs
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: not ld.lld -shared %tabs %t -o %t2 2>&1 | FileCheck %s
+# RUN: not ld.lld -shared %tabs %t -o /dev/null 2>&1 | FileCheck %s
# CHECK: (.debug_info+0x0): relocation R_X86_64_32 out of range: 281474976710656 is not in [0, 4294967295]; consider recompiling with -fdebug-types-section to reduce size of debug sections
diff --git a/lld/test/ELF/x86-64-reloc-error-reporting.s b/lld/test/ELF/x86-64-reloc-error-reporting.s
index d3a4ad4c9ad..bb9c8be8acc 100644
--- a/lld/test/ELF/x86-64-reloc-error-reporting.s
+++ b/lld/test/ELF/x86-64-reloc-error-reporting.s
@@ -8,7 +8,7 @@
// And the easy way to do that is to trigger GC. That way .text.dumb
// be collected and mentioned check will execute.
-// RUN: not ld.lld -gc-sections -shared %tabs %t -o %t2
+// RUN: not ld.lld -gc-sections -shared %tabs %t -o /dev/null
.section .text.dumb,"ax"
nop
diff --git a/lld/test/ELF/x86-64-reloc-error.s b/lld/test/ELF/x86-64-reloc-error.s
index 97e40a4ee45..0c3bebef04b 100644
--- a/lld/test/ELF/x86-64-reloc-error.s
+++ b/lld/test/ELF/x86-64-reloc-error.s
@@ -1,7 +1,7 @@
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/x86-64-reloc-error.s -o %tabs
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-// RUN: not ld.lld -shared %tabs %t -o %t2 2>&1 | FileCheck %s
+// RUN: not ld.lld -shared %tabs %t -o /dev/null 2>&1 | FileCheck %s
movl $big, %edx
movq $foo - 0x1000000000000, %rdx
diff --git a/lld/test/ELF/x86-64-reloc-pc32-fpic.s b/lld/test/ELF/x86-64-reloc-pc32-fpic.s
index 0bf5e8f9091..2dfd1bfb444 100644
--- a/lld/test/ELF/x86-64-reloc-pc32-fpic.s
+++ b/lld/test/ELF/x86-64-reloc-pc32-fpic.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
+# RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: relocation R_X86_64_PC32 cannot be used against symbol _shared; recompile with -fPIC
# CHECK: >>> defined in {{.*}}
diff --git a/lld/test/ELF/x86-64-reloc-range.s b/lld/test/ELF/x86-64-reloc-range.s
index fac4db67a07..c58a692821e 100644
--- a/lld/test/ELF/x86-64-reloc-range.s
+++ b/lld/test/ELF/x86-64-reloc-range.s
@@ -1,6 +1,6 @@
// REQUIRES: x86
// RUN: llvm-mc %s -o %t.o -triple x86_64-pc-linux -filetype=obj
-// RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s
+// RUN: not ld.lld %t.o -o /dev/null -shared 2>&1 | FileCheck %s
// CHECK: {{.*}}:(.text+0x3): relocation R_X86_64_PC32 out of range: 2147483648 is not in [-2147483648, 2147483647]
// CHECK-NOT: relocation
diff --git a/lld/test/ELF/x86-64-reloc-tpoff32-fpic.s b/lld/test/ELF/x86-64-reloc-tpoff32-fpic.s
index 7ae063bcc95..edb04c1d448 100644
--- a/lld/test/ELF/x86-64-reloc-tpoff32-fpic.s
+++ b/lld/test/ELF/x86-64-reloc-tpoff32-fpic.s
@@ -1,6 +1,6 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: not ld.lld %t.o -shared -o %t.so 2>&1 | FileCheck %s
+# RUN: not ld.lld %t.o -shared -o /dev/null 2>&1 | FileCheck %s
# CHECK: relocation R_X86_64_TPOFF32 cannot be used against symbol var; recompile with -fPIC
# CHECK: >>> defined in {{.*}}.o
diff --git a/lld/test/ELF/znotext-plt-relocations-protected.s b/lld/test/ELF/znotext-plt-relocations-protected.s
index 439d222ed23..4fd8065a287 100644
--- a/lld/test/ELF/znotext-plt-relocations-protected.s
+++ b/lld/test/ELF/znotext-plt-relocations-protected.s
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/znotext-plt-relocations-protected.s -o %t2.o
# RUN: ld.lld %t2.o -o %t2.so -shared
-# RUN: not ld.lld -z notext %t.o %t2.so -o %t 2>&1 | FileCheck %s
+# RUN: not ld.lld -z notext %t.o %t2.so -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: cannot preempt symbol: foo
OpenPOWER on IntegriCloud