diff options
Diffstat (limited to 'lld/test/ELF/linkerscript')
20 files changed, 27 insertions, 27 deletions
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 |