forked from OSchip/llvm-project
[ELF][test] Change -o %t to -o /dev/null if the output is not needed
This commit is contained in:
parent
a7ecf4c324
commit
81cebfd008
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc --triple=x86_64-pc-linux --filetype=obj -o %t.o %s
|
||||
# RUN: not ld.lld -z pac-plt -z force-bti %t.o -o %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -z pac-plt -z force-bti %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
#
|
||||
## Check that we error if -z pac-plt and -z force-bti are used when target is not
|
||||
## aarch64
|
||||
|
|
|
@ -24,8 +24,8 @@ _start:
|
|||
// S + A - P = 0x8000
|
||||
// CHECK-NEXT: 202158 ffff0080
|
||||
|
||||
// RUN: not ld.lld -z max-page-size=4096 %t.o %t255.o -o %t2 2>&1 | FileCheck %s --check-prefix=OVERFLOW1
|
||||
// RUN: not ld.lld -z max-page-size=4096 %t.o %t255.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW1
|
||||
// OVERFLOW1: relocation R_AARCH64_PREL16 out of range: -32769 is not in [-32768, 65535]; references foo
|
||||
|
||||
// RUN: not ld.lld -z max-page-size=4096 %t.o %t257.o -o %t2 2>&1 | FileCheck %s --check-prefix=OVERFLOW2
|
||||
// RUN: not ld.lld -z max-page-size=4096 %t.o %t257.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW2
|
||||
// OVERFLOW2: relocation R_AARCH64_PREL16 out of range: 65536 is not in [-32768, 65535]; references foo
|
||||
|
|
|
@ -24,8 +24,8 @@ _start:
|
|||
// S + A - P = 0x80000000
|
||||
// CHECK-NEXT: 202158 ffffffff 00000080
|
||||
|
||||
// RUN: not ld.lld -z max-page-size=4096 %t.o %t255.o -o %t2 2>&1 | FileCheck %s --check-prefix=OVERFLOW1
|
||||
// RUN: not ld.lld -z max-page-size=4096 %t.o %t255.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW1
|
||||
// OVERFLOW1: relocation R_AARCH64_PREL32 out of range: -2147483649 is not in [-2147483648, 4294967295]; references foo
|
||||
|
||||
// RUN: not ld.lld -z max-page-size=4096 %t.o %t257.o -o %t2 2>&1 | FileCheck %s --check-prefix=OVERFLOW2
|
||||
// RUN: not ld.lld -z max-page-size=4096 %t.o %t257.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OVERFLOW2
|
||||
// OVERFLOW2: relocation R_AARCH64_PREL32 out of range: 4294967296 is not in [-2147483648, 4294967295]; references foo
|
||||
|
|
|
@ -11,7 +11,7 @@ foo = 0x123
|
|||
|
||||
// RUN: echo ".global foo; foo = 0x124" > %t2.s
|
||||
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t2.s -o %t2.o
|
||||
// RUN: not ld.lld %t.o %t2.o -o %t.so -shared 2>&1 | FileCheck --check-prefix=DUP %s
|
||||
// RUN: not ld.lld %t.o %t2.o -o /dev/null -shared 2>&1 | FileCheck --check-prefix=DUP %s
|
||||
|
||||
// DUP: duplicate symbol: foo
|
||||
// DUP-NEXT: >>> defined in {{.*}}.o
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
# 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/allow-multiple-definition.s -o %t2
|
||||
# RUN: not ld.lld %t1 %t2 -o %t3
|
||||
# RUN: not ld.lld --allow-multiple-definition --no-allow-multiple-definition %t1 %t2 -o %t3
|
||||
# RUN: not ld.lld %t1 %t2 -o /dev/null
|
||||
# RUN: not ld.lld --allow-multiple-definition --no-allow-multiple-definition %t1 %t2 -o /dev/null
|
||||
# RUN: ld.lld --allow-multiple-definition --fatal-warnings %t1 %t2 -o %t3
|
||||
# RUN: ld.lld --allow-multiple-definition --fatal-warnings %t2 %t1 -o %t4
|
||||
# RUN: llvm-objdump -d %t3 | FileCheck %s
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# REQUIRES: amdgpu
|
||||
# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj %s -o %t-0.o
|
||||
# RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx900 -mattr=-code-object-v3 -filetype=obj %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: ld.lld: error: incompatible ABI version: {{.*}}-1.o
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES:arm
|
||||
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %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: arm-tag-vfp-args-illegal.s.tmp.o: unknown Tag_ABI_VFP_args value: 5
|
||||
.arch armv7-a
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
// RUN: ld.lld -shared %t.o -o %t2.so --target1-rel
|
||||
// RUN: llvm-objdump -t -d %t2.so | FileCheck %s \
|
||||
// RUN: --check-prefix=RELATIVE
|
||||
// RUN: not ld.lld -shared %t.o -o %t3.so 2>&1 | FileCheck %s \
|
||||
// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s \
|
||||
// RUN: --check-prefix=ABS
|
||||
|
||||
// RUN: ld.lld -shared %t.o -o %t2.so --target1-abs --target1-rel
|
||||
// RUN: llvm-objdump -t -d %t2.so | FileCheck %s \
|
||||
// RUN: --check-prefix=RELATIVE
|
||||
// RUN: not ld.lld -shared %t.o -o %t3.so --target1-rel --target1-abs 2>&1 \
|
||||
// RUN: not ld.lld -shared %t.o -o /dev/null --target1-rel --target1-abs 2>&1 \
|
||||
// RUN: | FileCheck %s --check-prefix=ABS
|
||||
|
||||
// RELOC: Relocations [
|
||||
|
|
|
@ -37,5 +37,5 @@ x:
|
|||
|
||||
|
||||
// Without any definition of __tls_get_addr we get an error
|
||||
// RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck --check-prefix=ERR %s
|
||||
// RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s
|
||||
// ERR: error: undefined symbol: __tls_get_addr
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// RUN: .text_low : { *(.text_low) *(.text_low2) } \
|
||||
// RUN: .text_high 0x2000000 : { *(.text_high) *(.text_high2) } \
|
||||
// RUN: } " > %t.script
|
||||
// RUN: not ld.lld --script %t.script %t -o %t2 2>&1 | FileCheck %s
|
||||
// RUN: not ld.lld --script %t.script %t -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: error: relocation R_ARM_THM_JUMP24 to far not supported for Armv5 or Armv6 targets
|
||||
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
# CHECK-NEXT: 0x000000007FFFFFFD AUXILIARY Auxiliary library: [aaa]
|
||||
# CHECK-NEXT: 0x000000007FFFFFFD AUXILIARY Auxiliary library: [bbb]
|
||||
|
||||
# RUN: not ld.lld %t.o -f aaa --auxiliary bbb -o %t 2>&1 \
|
||||
# RUN: not ld.lld %t.o -f aaa --auxiliary bbb -o /dev/null 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ERR %s
|
||||
# ERR: -f may not be used without -shared
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
// RUN: echo "!<arch>" > %t.a
|
||||
// RUN: echo "foo" >> %t.a
|
||||
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
||||
// RUN: not ld.lld %t.o %t.a -o %t 2>&1 | FileCheck -DFILE=%t.a %s
|
||||
// RUN: not ld.lld %t.o --whole-archive %t.a -o %t 2>&1 | FileCheck -DFILE=%t.a %s
|
||||
// RUN: not ld.lld %t.o %t.a -o /dev/null 2>&1 | FileCheck -DFILE=%t.a %s
|
||||
// RUN: not ld.lld %t.o --whole-archive %t.a -o /dev/null 2>&1 | FileCheck -DFILE=%t.a %s
|
||||
// CHECK: error: [[FILE]]: failed to parse archive: truncated or malformed archive (remaining size of archive too small for next archive member header at offset 8)
|
||||
|
||||
.globl _start
|
||||
|
|
|
@ -218,15 +218,15 @@ _start:
|
|||
# RUN: --check-prefix=INVRSP
|
||||
# INVRSP: invalid response file quoting: patatino
|
||||
|
||||
# RUN: not ld.lld %t.foo -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld %t.foo -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=MISSING %s
|
||||
# MISSING: cannot open {{.*}}.foo: {{[Nn]}}o such file or directory
|
||||
|
||||
# RUN: not ld.lld -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=NO_INPUT %s
|
||||
# NO_INPUT: ld.lld{{.*}}: no input files
|
||||
|
||||
# RUN: not ld.lld %t.no.such.file -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld %t.no.such.file -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=CANNOT_OPEN %s
|
||||
# CANNOT_OPEN: cannot open {{.*}}.no.such.file: {{[Nn]}}o such file or directory
|
||||
|
||||
|
@ -237,12 +237,12 @@ _start:
|
|||
# UNKNOWN: unknown argument '--foo'
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
||||
# RUN: not ld.lld %t %t -o %t2 2>&1 | FileCheck --check-prefix=DUP %s
|
||||
# RUN: not ld.lld %t %t -o /dev/null 2>&1 | FileCheck --check-prefix=DUP %s
|
||||
# DUP: duplicate symbol: _start
|
||||
# DUP-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
||||
# DUP-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
||||
|
||||
# RUN: not ld.lld %t -o %t -m wrong_emul_fbsd 2>&1 | FileCheck --check-prefix=UNKNOWN_EMUL %s
|
||||
# RUN: not ld.lld %t -o /dev/null -m wrong_emul_fbsd 2>&1 | FileCheck --check-prefix=UNKNOWN_EMUL %s
|
||||
# UNKNOWN_EMUL: unknown emulation: wrong_emul_fbsd
|
||||
|
||||
# RUN: not ld.lld %t --lto-partitions=0 2>&1 | FileCheck --check-prefix=NOTHREADS %s
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
# RUN: llvm-objdump -s %t2 | FileCheck %s --check-prefix=ZLIBCONTENT
|
||||
# RUN: llvm-readobj -S %t2 | FileCheck %s --check-prefix=ZLIBFLAGS
|
||||
|
||||
# RUN: not ld.lld %t.o -o %t1 --compress-debug-sections=zlib-gabi 2>&1 | \
|
||||
# RUN: not ld.lld %t.o -o /dev/null --compress-debug-sections=zlib-gabi 2>&1 | \
|
||||
# RUN: FileCheck -check-prefix=ERR %s
|
||||
# ERR: unknown --compress-debug-sections value: zlib-gabi
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# REQUIRES: zlib, 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 we are able to report zlib uncompress errors.
|
||||
# CHECK: error: {{.*}}.o:(.debug_str): uncompress failed: zlib error: Z_DATA_ERROR
|
||||
|
|
|
@ -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 are able to report errors even if DW_AT_decl_file
|
||||
## contains invalid file name index.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
||||
# RUN: llvm-dwarfdump %t.o | FileCheck -check-prefix=INPUT %s
|
||||
# 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
|
||||
|
||||
# INPUT: .debug_info contents:
|
||||
# INPUT: DW_TAG_variable
|
||||
|
@ -32,7 +32,7 @@
|
|||
# CHECK-NEXT: >>> {{.*}}:(.bss+0x0)
|
||||
|
||||
## Check that stripping debug sections does not break error reporting.
|
||||
# RUN: not ld.lld --strip-debug %t.o %t.o -o %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld --strip-debug %t.o %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# Used reduced output from following code and gcc 7.1.0
|
||||
# to produce this input file:
|
||||
|
|
|
@ -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 %t1.o -o %t2 2>&1 | FileCheck -check-prefix=DEMANGLE %s
|
||||
# RUN: not ld.lld %t1.o %t1.o -o /dev/null 2>&1 | FileCheck -check-prefix=DEMANGLE %s
|
||||
|
||||
# DEMANGLE: duplicate symbol: mul(double, double)
|
||||
# DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
||||
|
@ -10,7 +10,7 @@
|
|||
# DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
||||
# DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
||||
|
||||
# RUN: not ld.lld %t1.o %t1.o -o %t2 --no-demangle 2>&1 | \
|
||||
# RUN: not ld.lld %t1.o %t1.o -o /dev/null --no-demangle 2>&1 | \
|
||||
# RUN: FileCheck -check-prefix=NO_DEMANGLE %s
|
||||
|
||||
# NO_DEMANGLE: duplicate symbol: _Z3muldd
|
||||
|
@ -20,15 +20,15 @@
|
|||
# NO_DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
||||
# NO_DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
||||
|
||||
# RUN: not ld.lld %t1.o %t1.o -o %t2 --demangle --no-demangle 2>&1 | \
|
||||
# RUN: not ld.lld %t1.o %t1.o -o /dev/null --demangle --no-demangle 2>&1 | \
|
||||
# RUN: FileCheck -check-prefix=NO_DEMANGLE %s
|
||||
# RUN: not ld.lld %t1.o %t1.o -o %t2 --no-demangle --demangle 2>&1 | \
|
||||
# RUN: not ld.lld %t1.o %t1.o -o /dev/null --no-demangle --demangle 2>&1 | \
|
||||
# RUN: FileCheck -check-prefix=DEMANGLE %s
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/conflict.s -o %t2.o
|
||||
# RUN: rm -f %t3.a
|
||||
# RUN: llvm-ar rcs %t3.a %t2.o
|
||||
# RUN: not ld.lld %t1.o %t3.a -u baz -o %t2 2>&1 | FileCheck -check-prefix=ARCHIVE %s
|
||||
# RUN: not ld.lld %t1.o %t3.a -u baz -o /dev/null 2>&1 | FileCheck -check-prefix=ARCHIVE %s
|
||||
|
||||
# ARCHIVE: duplicate symbol: foo
|
||||
# ARCHIVE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
||||
|
|
|
@ -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/protected-shared.s -o %t2.o
|
||||
// RUN: ld.lld %t2.o -o %t2.so -shared
|
||||
// RUN: not ld.lld %t.o %t2.so -o %t 2>&1 | FileCheck %s
|
||||
// RUN: not ld.lld %t.o %t2.so -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: error: cannot preempt symbol: bar
|
||||
// CHECK: >>> defined in {{.*}}.so
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux -dwarf-version=5 %s -o %t.o
|
||||
# RUN: not ld.lld %t.o -o %t1 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# When compiling with -ffunction-sections, .debug_line may contain descriptions
|
||||
# of locations from the different text sections. Until relocated such
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux -dwarf-version=5 %s -o %t.o
|
||||
# RUN: not ld.lld %t.o -o %t1 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# Check we do not crash and able to report the source location.
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
## Check we are reporting the error correctly and don't crash
|
||||
## when handling the second --defsym.
|
||||
# RUN: not ld.lld -o %t2 %t.o --defsym ERR+ \
|
||||
# RUN: not ld.lld -o /dev/null %t.o --defsym ERR+ \
|
||||
# --defsym foo2=foo1 2>&1 | FileCheck %s --check-prefix=ERR
|
||||
# ERR: error: -defsym: syntax error: ERR+
|
||||
|
||||
|
@ -75,16 +75,16 @@
|
|||
# EXPR-NEXT: Section: Absolute
|
||||
# EXPR-NEXT: }
|
||||
|
||||
# RUN: not ld.lld -o %t %t.o --defsym=foo2=und 2>&1 | FileCheck %s -check-prefix=ERR1
|
||||
# RUN: not ld.lld -o /dev/null %t.o --defsym=foo2=und 2>&1 | FileCheck %s -check-prefix=ERR1
|
||||
# ERR1: error: -defsym:1: symbol not found: und
|
||||
|
||||
# RUN: not ld.lld -o %t %t.o --defsym=xxx=yyy,zzz 2>&1 | FileCheck %s -check-prefix=ERR2
|
||||
# RUN: not ld.lld -o /dev/null %t.o --defsym=xxx=yyy,zzz 2>&1 | FileCheck %s -check-prefix=ERR2
|
||||
# ERR2: -defsym:1: EOF expected, but got ,
|
||||
|
||||
# RUN: not ld.lld -o %t %t.o --defsym=foo 2>&1 | FileCheck %s -check-prefix=ERR3
|
||||
# RUN: not ld.lld -o /dev/null %t.o --defsym=foo 2>&1 | FileCheck %s -check-prefix=ERR3
|
||||
# ERR3: error: -defsym: syntax error: foo
|
||||
|
||||
# RUN: not ld.lld -o %t %t.o --defsym= 2>&1 | FileCheck %s -check-prefix=ERR4
|
||||
# RUN: not ld.lld -o /dev/null %t.o --defsym= 2>&1 | FileCheck %s -check-prefix=ERR4
|
||||
# ERR4: error: -defsym: syntax error:
|
||||
|
||||
.globl foo1
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
// RUN: cd %t.dir
|
||||
// RUN: echo > file.bin
|
||||
|
||||
// RUN: not ld.lld %t.o --format=binary file.bin -o %t.elf 2>&1 | FileCheck %s
|
||||
// RUN: not ld.lld %t.o --format binary file.bin -o %t.elf 2>&1 | FileCheck %s
|
||||
// RUN: not ld.lld %t.o --format=binary file.bin -o /dev/null 2>&1 | FileCheck %s
|
||||
// RUN: not ld.lld %t.o --format binary file.bin -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: duplicate symbol: _binary_file_bin_start
|
||||
// CHECK-NEXT: defined at {{.*}}.o:(.text+0x0)
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
||||
# RUN: echo "{ local: *; };" > %t.list
|
||||
# RUN: not ld.lld -dynamic-list %t.list -shared %t.o -o %t.so 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -dynamic-list %t.list -shared %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: error: {{.*}}:1: "local:" scope not supported in --dynamic-list
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
||||
# RUN: echo "{ }; foo;" > %t.list
|
||||
# RUN: not ld.lld -dynamic-list %t.list -shared %t.o -o %t.so 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -dynamic-list %t.list -shared %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: error: {{.*}}:1: EOF expected, but got foo
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# REQUIRES: x86
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
||||
# RUN: not ld.lld --eh-frame-hdr %t.o -o %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld --eh-frame-hdr %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
# CHECK: error: unknown FDE size encoding
|
||||
|
||||
.section .eh_frame, "ax"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// RUN: .text : { *(.text) *(.rodata.foo) } \
|
||||
// RUN: .rodata : { *(.rodata.bar) } \
|
||||
// RUN: }" > %t.lds
|
||||
// RUN: not ld.lld -T%t.lds %t.o -o %t -execute-only 2>&1 | FileCheck %s
|
||||
// RUN: not ld.lld -T%t.lds %t.o -o /dev/null -execute-only 2>&1 | FileCheck %s
|
||||
|
||||
// RUN: echo "SECTIONS \
|
||||
// RUN: { \
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
# Sanity check that the link will fail with the undefined error without
|
||||
# gc-sections.
|
||||
# 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: undefined
|
||||
|
||||
# RUN: ld.lld %t.o --gc-sections -o %t
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
||||
# RUN: not ld.lld --gdb-index -e main %t.o -o %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld --gdb-index -e main %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/gdb-index-invalid-ranges.obj.s -o %t2.o
|
||||
# RUN: llvm-ar rc %t.a %t.o
|
||||
# RUN: not ld.lld --gdb-index -e main %t2.o %t.a -o %t 2>&1 | FileCheck --check-prefix=ARCHIVE %s
|
||||
# RUN: not ld.lld --gdb-index -e main %t2.o %t.a -o /dev/null 2>&1 | FileCheck --check-prefix=ARCHIVE %s
|
||||
|
||||
# CHECK: ld.lld: error: {{.*}}gdb-index-invalid-ranges.s.tmp.o:(.debug_info): decoding address ranges: invalid range list entry at offset 0x10
|
||||
# ARCHIVE: ld.lld: error: {{.*}}gdb-index-invalid-ranges.s.tmp.a(gdb-index-invalid-ranges.s.tmp.o):(.debug_info): decoding address ranges: invalid range list entry at offset 0x10
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
|
||||
# RUN: not ld.lld --gdb-index %t1.o -o %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld --gdb-index %t1.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: error: {{.*}}:(.debug_info): invalid reference to or invalid content in .debug_str_offsets[.dwo]: insufficient space for 32 bit header prefix
|
||||
|
||||
|
|
|
@ -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 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# On some targets the location of the _GLOBAL_OFFSET_TABLE_ symbol table can
|
||||
# matter for the correctness of some relocations. Follow the example of ld.gold
|
||||
|
|
|
@ -19,5 +19,5 @@ _start:
|
|||
# CHECK: _start:
|
||||
# CHECK-NEXT: 4010f5: 8b 1d {{.*}} movl 4202748, %ebx
|
||||
|
||||
# RUN: not ld.lld %t.o -o %t -pie 2>&1 | FileCheck %s --check-prefix=ERR
|
||||
# RUN: not ld.lld %t.o -o /dev/null -pie 2>&1 | FileCheck %s --check-prefix=ERR
|
||||
# ERR: error: symbol 'foo' cannot be preempted; recompile with -fPIE
|
||||
|
|
|
@ -41,6 +41,6 @@
|
|||
# CHECK-NEXT: 401121: 8b 80 {{.*}} movl -4100(%eax), %eax
|
||||
# CHECK-NEXT: 401127: 8b 83 {{.*}} movl -4100(%ebx), %eax
|
||||
|
||||
# RUN: not ld.lld %S/Inputs/i386-got32x-baseless.elf -o %t1 -pie 2>&1 | \
|
||||
# RUN: not ld.lld %S/Inputs/i386-got32x-baseless.elf -o /dev/null -pie 2>&1 | \
|
||||
# RUN: FileCheck %s --check-prefix=ERR
|
||||
# ERR-COUNT-2: error: symbol 'foo' cannot be preempted; recompile with -fPIE
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: hexagon
|
||||
# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %s -o %t.o
|
||||
# RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck --implicit-check-not "out of range" %s
|
||||
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck --implicit-check-not "out of range" %s
|
||||
|
||||
.globl _start
|
||||
.type _start, @function
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/hidden-shared-err2.s -o %t3.o
|
||||
|
||||
# RUN: ld.lld -shared -o %t2.so %t2.o
|
||||
# RUN: not ld.lld %t.o %t2.so -o %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t2.so %t.o -o %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.o %t2.so -o /dev/null 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t2.so %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# RUN: not ld.lld %t.o %t3.o %t2.so -o %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t3.o %t.o %t2.so -o %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.o %t3.o %t2.so -o /dev/null 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t3.o %t.o %t2.so -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: undefined hidden symbol: foo
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// RUN: llvm-mc -filetype=obj -triple=i386-pc-linux %p/Inputs/i386-pic-plt.s -o %t2.o
|
||||
// RUN: ld.lld -shared %t2.o -o %t2.so
|
||||
// RUN: ld.lld %t.o %t2.so -o %t
|
||||
// RUN: not ld.lld %t.o %t2.so -o %t -pie 2>&1 | FileCheck %s
|
||||
// RUN: not ld.lld %t.o %t2.so -o /dev/null -pie 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: error: symbol 'foo' cannot be preempted; recompile with -fPIE
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# RUN: ld.lld -image-base=0x1000000 %t -o %t1
|
||||
# RUN: llvm-readobj -l %t1 | FileCheck %s
|
||||
|
||||
# RUN: not ld.lld -image-base=ABC %t -o %t1 2>&1 | FileCheck --check-prefix=ERR %s
|
||||
# RUN: not ld.lld -image-base=ABC %t -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s
|
||||
# ERR: error: -image-base: number expected, but got ABC
|
||||
|
||||
# RUN: ld.lld -image-base=0x1000 -z max-page-size=0x2000 %t -o %t1 2>&1 | FileCheck --check-prefix=WARN %s
|
||||
|
|
|
@ -4,43 +4,43 @@
|
|||
// RUN: ld.lld -shared %tb.o -o %ti686.so
|
||||
// RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %tc.o
|
||||
|
||||
// RUN: not ld.lld %ta.o %tb.o -o %t 2>&1 | \
|
||||
// RUN: not ld.lld %ta.o %tb.o -o /dev/null 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=A-AND-B %s
|
||||
// A-AND-B: b.o is incompatible with {{.*}}a.o
|
||||
|
||||
// RUN: not ld.lld %tb.o %tc.o -o %t 2>&1 | \
|
||||
// RUN: not ld.lld %tb.o %tc.o -o /dev/null 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=B-AND-C %s
|
||||
// B-AND-C: c.o is incompatible with {{.*}}b.o
|
||||
|
||||
// RUN: not ld.lld %ta.o %ti686.so -o %t 2>&1 | \
|
||||
// RUN: not ld.lld %ta.o %ti686.so -o /dev/null 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=A-AND-SO %s
|
||||
// A-AND-SO: i686.so is incompatible with {{.*}}a.o
|
||||
|
||||
// RUN: not ld.lld %tc.o %ti686.so -o %t 2>&1 | \
|
||||
// RUN: not ld.lld %tc.o %ti686.so -o /dev/null 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=C-AND-SO %s
|
||||
// C-AND-SO: i686.so is incompatible with {{.*}}c.o
|
||||
|
||||
// RUN: not ld.lld %ti686.so %tc.o -o %t 2>&1 | \
|
||||
// RUN: not ld.lld %ti686.so %tc.o -o /dev/null 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=SO-AND-C %s
|
||||
// SO-AND-C: c.o is incompatible with {{.*}}i686.so
|
||||
|
||||
// RUN: not ld.lld -m elf64ppc %ta.o -o %t 2>&1 | \
|
||||
// RUN: not ld.lld -m elf64ppc %ta.o -o /dev/null 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=A-ONLY %s
|
||||
// A-ONLY: a.o is incompatible with elf64ppc
|
||||
|
||||
// RUN: not ld.lld -m elf64ppc %tb.o -o %t 2>&1 | \
|
||||
// RUN: not ld.lld -m elf64ppc %tb.o -o /dev/null 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=B-ONLY %s
|
||||
// B-ONLY: b.o is incompatible with elf64ppc
|
||||
|
||||
// RUN: not ld.lld -m elf64ppc %tc.o -o %t 2>&1 | \
|
||||
// RUN: not ld.lld -m elf64ppc %tc.o -o /dev/null 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=C-ONLY %s
|
||||
// C-ONLY: c.o is incompatible with elf64ppc
|
||||
|
||||
// RUN: not ld.lld -m elf_i386 %tc.o %ti686.so -o %t 2>&1 | \
|
||||
// RUN: not ld.lld -m elf_i386 %tc.o %ti686.so -o /dev/null 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=C-AND-SO-I386 %s
|
||||
// C-AND-SO-I386: c.o is incompatible with elf_i386
|
||||
|
||||
// RUN: not ld.lld -m elf_i386 %ti686.so %tc.o -o %t 2>&1 | \
|
||||
// RUN: not ld.lld -m elf_i386 %ti686.so %tc.o -o /dev/null 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=SO-AND-C-I386 %s
|
||||
// SO-AND-C-I386: c.o is incompatible with elf_i386
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
|||
// RUN: rm -f %t.a
|
||||
// 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 2>&1 -o %t | FileCheck --check-prefix=ARCHIVE %s
|
||||
// RUN: not ld.lld %t.a %tb.o 2>&1 -o /dev/null | FileCheck --check-prefix=ARCHIVE %s
|
||||
// ARCHIVE: .a({{.*}}a.o) is incompatible with {{.*}}b.o
|
||||
.global _start
|
||||
_start:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# WARN: found local symbol 'foo' in global part of symbol table in file {{.*}}local-symbol-in-dso.so
|
||||
|
||||
# RUN: llvm-mc %s -o %t.o -filetype=obj -triple x86_64-pc-linux
|
||||
# RUN: not ld.lld %t.o %p/Inputs/local-symbol-in-dso.so -o %t
|
||||
# RUN: not ld.lld %t.o %p/Inputs/local-symbol-in-dso.so -o /dev/null
|
||||
|
||||
.globl main
|
||||
main:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# RUN: yaml2obj --docnum=1 %s -o %t1.o
|
||||
# RUN: not ld.lld %t1.o -o %t1 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t1.o -o /dev/null 2>&1 | FileCheck %s
|
||||
# CHECK: error: {{.*}}.o: unsupported relocation reference
|
||||
|
||||
--- !ELF
|
||||
|
@ -25,7 +25,7 @@ Symbols:
|
|||
Binding: STB_GLOBAL
|
||||
|
||||
# RUN: yaml2obj --docnum=2 %s -o %t2.o
|
||||
# RUN: not ld.lld %t2.o -o %t2 2>&1 | FileCheck %s --check-prefix=ERR2
|
||||
# RUN: not ld.lld %t2.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR2
|
||||
# ERR2: error: {{.*}}.o: invalid relocated section index: 99
|
||||
|
||||
--- !ELF
|
||||
|
@ -53,7 +53,7 @@ Symbols:
|
|||
## Relocation refers to a symbol with index larger than
|
||||
## symbol table size. Check we report it.
|
||||
# RUN: yaml2obj --docnum=3 %s -o %t2.o
|
||||
# RUN: not ld.lld %t2.o -o %t2 2>&1 | FileCheck %s --check-prefix=ERR3
|
||||
# RUN: not ld.lld %t2.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR3
|
||||
# ERR3: error: {{.*}}.o: invalid symbol index
|
||||
|
||||
--- !ELF
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# REQUIRES: x86
|
||||
|
||||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not ld.lld %t.o -o %t.exe 2>&1 | FileCheck --check-prefix=ERR %s
|
||||
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s
|
||||
# ERR: R_X86_64_GOTTPOFF must be used in MOVQ or ADDQ instructions only
|
||||
# ERR: R_X86_64_GOTTPOFF must be used in MOVQ or ADDQ instructions only
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# 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 %t.o -o %t.exe 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.o %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: error: {{.*}}.o: unsupported SHT_GROUP format
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
## If an object contains a common symbol with zero alignment,
|
||||
## check we report it.
|
||||
# RUN: yaml2obj --docnum=1 %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: common symbol 'bar' has invalid alignment: 0
|
||||
|
||||
--- !ELF
|
||||
|
@ -19,7 +19,7 @@ Symbols:
|
|||
## If an object contains a common symbol with alignment greater
|
||||
## than UINT32_MAX, check we report it.
|
||||
# RUN: yaml2obj --docnum=2 %s -o %t2.o
|
||||
# RUN: not ld.lld %t2.o -o %t 2>&1 | FileCheck %s --check-prefix=BIG
|
||||
# RUN: not ld.lld %t2.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=BIG
|
||||
# BIG: common symbol 'bar' has invalid alignment: 271644049215
|
||||
|
||||
--- !ELF
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not ld.lld -gdb-index %t.o -o %t.exe 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -gdb-index %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: error: {{.*}}invalid-debug-relocations.test.tmp.o:(.debug_info+0x0): unknown relocation (255) against symbol _start
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# RUN: rm -rf %t && mkdir -p %t
|
||||
# RUN: echo > %t/empty.o
|
||||
# RUN: llvm-ar --format=gnu cr %t/not-elf.a %t/empty.o
|
||||
# RUN: not ld.lld --whole-archive %t/not-elf.a -o %t2 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld --whole-archive %t/not-elf.a -o /dev/null 2>&1 | FileCheck %s
|
||||
# CHECK: not-elf.a(empty.o): not an ELF file
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
# RUN: echo -e -n "\x7f\x45\x4c\x46\x00\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00" > %t/invalid.o
|
||||
|
||||
# RUN: llvm-ar --format=gnu cr %t/invalid-class.a %t/invalid.o
|
||||
# RUN: not ld.lld -whole-archive %t/invalid-class.a -o %t2 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -whole-archive %t/invalid-class.a -o /dev/null 2>&1 | FileCheck %s
|
||||
# CHECK: invalid-class.a(invalid.o): corrupted ELF file: invalid file class
|
||||
|
||||
# RUN: not ld.lld %t/invalid.o -o %t2 2>&1 | FileCheck %s --check-prefix=OBJ
|
||||
# RUN: not ld.lld %t/invalid.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=OBJ
|
||||
# OBJ: invalid.o: corrupted ELF file: invalid file class
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: yaml2obj %s -o %t.so
|
||||
# RUN: not ld.lld %t.so -o %t.exe 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.so -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: error: {{.*}}.so: invalid DT_SONAME entry
|
||||
|
||||
|
|
|
@ -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
|
||||
# CHECK: invalid sh_link index: 12345
|
||||
|
||||
--- !ELF
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# RUN: yaml2obj %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: error: {{.*}}1.o: zero option descriptor size
|
||||
|
||||
## YAML has a description of ODK_NULL (Undefined) MIPS option,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# RUN: yaml2obj %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: error: {{.*}}1.o: multiple relocation sections to one section are not supported
|
||||
|
||||
## The file has two relocation sections referring to a single target section.
|
||||
|
|
|
@ -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
|
||||
|
||||
# CHECK: {{.*}}:(.merge): string is not null terminated
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# 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
|
||||
# CHECK: unsupported relocation reference
|
||||
|
||||
## YAML below lists .rela.text before .text, we do not support it.
|
||||
|
|
|
@ -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
|
||||
|
||||
## In current lld implementation, we do not accept sh_addralign
|
||||
## larger than UINT32_MAX.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not ld.lld %t.o -o %tout 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: error: {{.*}}.o:(.text): sh_addralign is not a power of 2
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
## check we report it.
|
||||
|
||||
# RUN: yaml2obj %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: {{.*}}1.o: invalid section index: 256
|
||||
|
||||
!ELF
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not ld.lld %t.o %t.o -o %t.exe 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.o %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
# CHECK: error: {{.*}}.o: invalid section index in group: 12345
|
||||
|
||||
--- !ELF
|
||||
|
|
|
@ -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
|
||||
# CHECK: invalid symbol index
|
||||
|
||||
--- !ELF
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 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
|
||||
# CHECK: error: {{.*}}.o: invalid symbol name offset
|
||||
|
||||
## YAML below contains symbol with name offset in st_name
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
## zero entry that must exist in a valid object, so sh_info can't be null.
|
||||
## Check we report a proper error for that case.
|
||||
# RUN: yaml2obj --docnum=1 %s -o %t.o
|
||||
# RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck %s --check-prefix=ERR1
|
||||
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR1
|
||||
# ERR1: invalid sh_info in symbol table
|
||||
|
||||
--- !ELF
|
||||
|
@ -22,7 +22,7 @@ Symbols:
|
|||
## sh_info has value 2 what says that non-local symbol `foo` is local.
|
||||
## Check we report this case.
|
||||
# RUN: yaml2obj --docnum=2 %s -o %t.o
|
||||
# RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck --check-prefix=ERR2 %s
|
||||
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck --check-prefix=ERR2 %s
|
||||
# ERR2: broken object: getLocalSymbols returns a non-local symbol
|
||||
|
||||
--- !ELF
|
||||
|
@ -42,7 +42,7 @@ Symbols:
|
|||
## sh_info has value 0xff what is larger than number of symbols in a .symtab.
|
||||
## Check we report this case.
|
||||
# RUN: yaml2obj --docnum=3 %s -o %t.o
|
||||
# RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck --check-prefix=ERR1 %s
|
||||
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck --check-prefix=ERR1 %s
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
|
|
|
@ -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
|
||||
|
||||
## When we have SHT_GNU_versym section, it is should be associated
|
||||
## with symbol table section.
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
// Should link normally, because _bar is not used
|
||||
// RUN: ld.lld -o %t3 %t.o
|
||||
// Should not link because of undefined symbol _bar
|
||||
// RUN: not ld.lld -o %t3 %t.o %tbar.o 2>&1 \
|
||||
// RUN: not ld.lld -o /dev/null %t.o %tbar.o 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=UNDEFINED %s
|
||||
// UNDEFINED: error: undefined symbol: _bar
|
||||
// UNDEFINED: >>> referenced by {{.*}}:(.bar+0x0)
|
||||
|
||||
// Should fail if cannot find specified library (without -L switch)
|
||||
// RUN: not ld.lld -o %t3 %t.o -lls 2>&1 \
|
||||
// RUN: not ld.lld -o /dev/null %t.o -lls 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=NOLIB %s
|
||||
// NOLIB: unable to find library -lls
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
|||
// Should not search for dynamic libraries if -Bstatic is specified
|
||||
// RUN: ld.lld -o %t3 %t.o -L%t.dir -Bstatic -lls
|
||||
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
|
||||
// RUN: not ld.lld -o %t3 %t.o -L%t.dir -Bstatic -lls2 2>&1 \
|
||||
// RUN: not ld.lld -o /dev/null %t.o -L%t.dir -Bstatic -lls2 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=NOLIB2 %s
|
||||
// NOLIB2: unable to find library -lls2
|
||||
|
||||
|
@ -94,7 +94,7 @@
|
|||
// -nostdlib
|
||||
// RUN: echo 'SEARCH_DIR("'%t.dir'")' > %t.script
|
||||
// RUN: ld.lld -o %t3 %t.o -script %t.script -lls
|
||||
// RUN: not ld.lld -o %t3 %t.o -script %t.script -lls -nostdlib \
|
||||
// RUN: not ld.lld -o /dev/null %t.o -script %t.script -lls -nostdlib \
|
||||
// RUN: 2>&1 | FileCheck --check-prefix=NOSTDLIB %s
|
||||
// NOSTDLIB: unable to find library -lls
|
||||
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
||||
|
||||
# RUN: echo "SECTIONS { .bar (foo) : { } };" > %t.script
|
||||
# RUN: not ld.lld -o %t --script %t.script %t.o 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 | FileCheck %s
|
||||
# CHECK: symbol not found: foo
|
||||
|
||||
# RUN: echo "SECTIONS { .bar : AT(foo) { } };" > %t.script
|
||||
# RUN: not ld.lld -o %t --script %t.script %t.o 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 | FileCheck %s
|
||||
|
||||
# RUN: echo "SECTIONS { .bar : ALIGN(foo) { } };" > %t.script
|
||||
# RUN: not ld.lld -o %t --script %t.script %t.o 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 | FileCheck %s
|
||||
|
||||
# RUN: echo "SECTIONS { .bar : SUBALIGN(foo) { } };" > %t.script
|
||||
# RUN: not ld.lld -o %t --script %t.script %t.o 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 | FileCheck %s
|
||||
|
|
|
@ -36,9 +36,9 @@ SECTIONS {
|
|||
|
||||
## Test we fail gracefuly when alignment value is not a power of 2 (#1).
|
||||
# RUN: echo "SECTIONS { . = 0x123; . = ALIGN(0x123, 3); .aaa : { *(.aaa) } }" > %t.script
|
||||
# RUN: not ld.lld -o %t6 --script %t.script %t.o 2>&1 | FileCheck -check-prefix=ERR %s
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 | FileCheck -check-prefix=ERR %s
|
||||
|
||||
# RUN: echo "SECTIONS { . = 0x123; . = ALIGN(3); .aaa : { *(.aaa) } }" > %t.script
|
||||
# RUN: not ld.lld -o %t7 --script %t.script %t.o 2>&1 | FileCheck -check-prefix=ERR %s
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 | FileCheck -check-prefix=ERR %s
|
||||
|
||||
# ERR: {{.*}}.script:1: alignment must be power of 2
|
||||
|
|
|
@ -19,6 +19,6 @@ SECTIONS {
|
|||
## Check that we error out if trying to get alignment of
|
||||
## section that does not exist.
|
||||
# RUN: echo "SECTIONS { _aaa = ALIGNOF(.foo); }" > %t.script
|
||||
# RUN: not ld.lld -o %t1 --script %t.script %t 2>&1 \
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ERR %s
|
||||
# ERR: {{.*}}.script:1: undefined section .foo
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.o
|
||||
# RUN: not ld.lld -o %t.exe %t.o --script %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -o /dev/null %t.o --script %s 2>&1 | FileCheck %s
|
||||
|
||||
MEMORY {
|
||||
FLASH (ax) : ORIGIN = 0x2000, LENGTH = 0x100
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
## Check we do not crash.
|
||||
|
||||
# RUN: echo "MEMORY { FLASH (rx) : ORIGIN = 0x1000< LENGTH" > %t.script
|
||||
# RUN: not ld.lld -o %t --script %t.script 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script 2>&1 | FileCheck %s
|
||||
# CHECK: unexpected EOF
|
||||
|
||||
# RUN: echo "MEMORY { FLASH (rx) : ORIGIN = 0x1000< ORIGIN" > %t.script
|
||||
# RUN: not ld.lld -o %t --script %t.script 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script 2>&1 | FileCheck %s
|
||||
|
||||
# RUN: echo "MEMORY { FLASH (rx) : ORIGIN = 0x1000, LENGTH = CONSTANT" > %t.script
|
||||
# RUN: not ld.lld -o %t --script %t.script 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script 2>&1 | FileCheck %s
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.o
|
||||
# RUN: not ld.lld -shared %t.o -o %t --script %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
# RUN: not ld.lld -shared %t.o -o /dev/null --script %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
|
||||
SECTIONS {
|
||||
.text + { *(.text) }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.o
|
||||
# RUN: not ld.lld -shared %t.o -o %t --script %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
# RUN: not ld.lld -shared %t.o -o /dev/null --script %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
|
||||
UNKNOWN_TAG {
|
||||
.text : { *(.text) }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.o
|
||||
# RUN: not ld.lld -shared %t.o -o %t --script %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
# RUN: not ld.lld -shared %t.o -o /dev/null --script %s 2>&1 | FileCheck -strict-whitespace %s
|
||||
|
||||
SECTIONS {
|
||||
.text : { *(.text) }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.o
|
||||
# RUN: echo "INCLUDE \"%s\"" > %t.script
|
||||
# RUN: not ld.lld -shared %t.o -o %t --script %t.script 2>&1 | FileCheck -strict-whitespace %s
|
||||
# RUN: not ld.lld -shared %t.o -o /dev/null --script %t.script 2>&1 | FileCheck -strict-whitespace %s
|
||||
|
||||
SECTIONS {
|
||||
.text : { *(.text) }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.o
|
||||
# RUN: echo "INCLUDE \"%s\"" > %t.script
|
||||
# RUN: not ld.lld -shared %t.o -o %t --script %t.script 2>&1 | FileCheck -strict-whitespace %s
|
||||
# RUN: not ld.lld -shared %t.o -o /dev/null --script %t.script 2>&1 | FileCheck -strict-whitespace %s
|
||||
|
||||
SECTIONS {
|
||||
.text : { *(.text) }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.o
|
||||
# RUN: not ld.lld -shared %t.o -o %t --script %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -shared %t.o -o /dev/null --script %s 2>&1 | FileCheck %s
|
||||
|
||||
SECTIONS /*
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
||||
|
||||
# RUN: echo "SECTIONS { /DISCARD/ : { *(.shstrtab) } }" > %t.script
|
||||
# RUN: not ld.lld -o %t --script %t.script %t.o 2>&1 | \
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 | \
|
||||
# RUN: FileCheck -check-prefix=SHSTRTAB %s
|
||||
# SHSTRTAB: discarding .shstrtab section is not allowed
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
# RUN: llvm-readobj -S %t | FileCheck /dev/null --implicit-check-not='Name: .rela.dyn'
|
||||
|
||||
# RUN: echo "SECTIONS { /DISCARD/ : { *(.relr.dyn) } }" > %t.script
|
||||
# RUN: not ld.lld -pie --pack-dyn-relocs=relr -o %t --script %t.script %t.o 2>&1 | \
|
||||
# RUN: not ld.lld -pie --pack-dyn-relocs=relr -o /dev/null --script %t.script %t.o 2>&1 | \
|
||||
# RUN: FileCheck -check-prefix=RELRDYN %s
|
||||
# RELRDYN: discarding .relr.dyn section is not allowed
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/eh-frame-reloc-out-of-range.s -o %t.o
|
||||
# RUN: not ld.lld %t.o -T %s -o %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.o -T %s -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
PHDRS { eh PT_LOAD; text PT_LOAD; }
|
||||
SECTIONS { . = 0x10000;
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
# CHECK-NEXT: 06000000 00000000
|
||||
|
||||
# RUN: echo "SECTIONS { .foo : { *(EXCLUDE_FILE (*file1.o) EXCLUDE_FILE (*file2.o) .foo.3) } }" > %t2.script
|
||||
# RUN: not ld.lld -script %t2.script %tfile1.o %tfile2.o %tfile3.o -o %t2.o 2>&1 | \
|
||||
# RUN: not ld.lld -script %t2.script %tfile1.o %tfile2.o %tfile3.o -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck %s --check-prefix=ERR
|
||||
# ERR: section pattern is expected
|
||||
|
||||
# RUN: echo "SECTIONS { .foo : { *(EXCLUDE_FILE (*file1.o)) } }" > %t3.script
|
||||
# RUN: not ld.lld -script %t3.script %tfile1.o %tfile2.o %tfile3.o -o %t2.o 2>&1 | \
|
||||
# RUN: not ld.lld -script %t3.script %tfile1.o %tfile2.o %tfile3.o -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck %s --check-prefix=ERR
|
||||
|
||||
.section .foo.1,"a"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.o
|
||||
# RUN: not ld.lld -o %t.so --script %s %t.o -shared 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -o /dev/null --script %s %t.o -shared 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: error: {{.*}}.test:8: at least one side of the expression must be absolute
|
||||
|
||||
|
|
|
@ -16,29 +16,29 @@
|
|||
# RUN: llvm-readobj %t2 > /dev/null
|
||||
|
||||
# RUN: echo "GROUP(\"%t\" libxyz.a )" > %t.script
|
||||
# RUN: not ld.lld -o %t2 %t.script 2>/dev/null
|
||||
# RUN: not ld.lld -o /dev/null %t.script 2>/dev/null
|
||||
# RUN: ld.lld -o %t2 %t.script -L%t.dir
|
||||
# RUN: llvm-readobj %t2 > /dev/null
|
||||
|
||||
# RUN: echo "GROUP(\"%t\" =libxyz.a )" > %t.script
|
||||
# RUN: not ld.lld -o %t2 %t.script 2>/dev/null
|
||||
# RUN: not ld.lld -o /dev/null %t.script 2>/dev/null
|
||||
# RUN: ld.lld -o %t2 %t.script --sysroot=%t.dir
|
||||
# RUN: llvm-readobj %t2 > /dev/null
|
||||
|
||||
# RUN: echo "GROUP(\"%t\" -lxyz )" > %t.script
|
||||
# RUN: not ld.lld -o %t2 %t.script 2>/dev/null
|
||||
# RUN: not ld.lld -o /dev/null %t.script 2>/dev/null
|
||||
# RUN: ld.lld -o %t2 %t.script -L%t.dir
|
||||
# RUN: llvm-readobj %t2 > /dev/null
|
||||
|
||||
# RUN: echo "GROUP(\"%t\" libxyz.a )" > %t.script
|
||||
# RUN: not ld.lld -o %t2 %t.script 2>/dev/null
|
||||
# RUN: not ld.lld -o /dev/null %t.script 2>/dev/null
|
||||
# RUN: ld.lld -o %t2 %t.script -L%t.dir
|
||||
# RUN: llvm-readobj %t2 > /dev/null
|
||||
|
||||
# RUN: echo "GROUP(\"%t\" /libxyz.a )" > %t.script
|
||||
# RUN: echo "GROUP(\"%t\" /libxyz.a )" > %t.dir/xyz.script
|
||||
# RUN: not ld.lld -o %t2 %t.script 2>/dev/null
|
||||
# RUN: not ld.lld -o %t2 %t.script --sysroot=%t.dir 2>/dev/null
|
||||
# RUN: not ld.lld -o /dev/null %t.script 2>/dev/null
|
||||
# RUN: not ld.lld -o /dev/null %t.script --sysroot=%t.dir 2>/dev/null
|
||||
# RUN: ld.lld -o %t2 %t.dir/xyz.script --sysroot=%t.dir
|
||||
# RUN: llvm-readobj %t2 > /dev/null
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
# RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix=NONALLOC
|
||||
|
||||
# RUN: echo "SECTIONS { .bar 0x20000 (BAR) : { *(.foo) } };" > %t.script
|
||||
# RUN: not ld.lld -o %t --script %t.script %t.o 2>&1 |\
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 |\
|
||||
# RUN: FileCheck %s --check-prefix=UNKNOWN
|
||||
# UNKNOWN: unknown section directive: BAR
|
||||
|
||||
|
|
|
@ -2,5 +2,5 @@ SECTIONS {
|
|||
.foo : { *(.bar) }
|
||||
} INSERT .data;
|
||||
|
||||
# RUN: not ld.lld -o %t1 --script %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -o /dev/null --script %s 2>&1 | FileCheck %s
|
||||
# CHECK: {{.*}}:3: expected AFTER/BEFORE, but got '.data'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64 %p/Inputs/insert-after.s -o %t.o
|
||||
# RUN: not ld.lld -T %s %t.o -o %t.out 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -T %s %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: error: unable to insert .foo.data after .not_exist
|
||||
# CHECK: error: unable to insert .foo.text before .not_exist
|
||||
|
|
|
@ -36,14 +36,14 @@
|
|||
# RUN: rm -rf %t.dir && mkdir -p %t.dir
|
||||
# RUN: echo "INCLUDE \"foo.script\"" > %t.script
|
||||
# RUN: echo "OUTPUT(\"%t.out\")" > %t.dir/foo.script
|
||||
# RUN: not ld.lld %t.script -o %t.out > %t.log 2>&1
|
||||
# RUN: not ld.lld %t.script -o /dev/null > %t.log 2>&1
|
||||
# RUN: FileCheck -check-prefix=INCLUDE_ERR %s < %t.log
|
||||
# INCLUDE_ERR: error: {{.+}}.script:1: cannot find linker script foo.script
|
||||
# INCLUDE_ERR-NEXT: INCLUDE "foo.script"
|
||||
# RUN: ld.lld -L %t.dir %t.script %t
|
||||
|
||||
# RUN: echo "FOO(BAR)" > %t.script
|
||||
# RUN: not ld.lld -o %t.out %t.script > %t.log 2>&1
|
||||
# RUN: not ld.lld -o /dev/null %t.script > %t.log 2>&1
|
||||
# RUN: FileCheck -check-prefix=ERR1 %s < %t.log
|
||||
|
||||
# ERR1: unknown directive: FOO
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# REQUIRES: x86
|
||||
|
||||
# RUN: echo '.section .foo,"a"; .quad 1' | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t.o
|
||||
# RUN: not ld.lld -o %t %t.o --script %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -o /dev/null %t.o --script %s 2>&1 | FileCheck %s
|
||||
# CHECK: error: section '.foo' will not fit in region 'flash': overflowed by 264 bytes
|
||||
|
||||
MEMORY {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# RUN: ld.lld %t --script %t.script -o %t2
|
||||
# RUN: llvm-objdump -t %t2 | FileCheck %s
|
||||
# RUN: echo "SECTIONS { v = LOADADDR(.zzz); }" > %t.script
|
||||
# RUN: not ld.lld %t --script %t.script -o %t2 2>&1 | FileCheck --check-prefix=ERROR %s
|
||||
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR %s
|
||||
|
||||
# CHECK: 0000000000002000 *ABS* 00000000 aaa_lma
|
||||
# CHECK-NEXT: 0000000000002008 *ABS* 00000000 bbb_lma
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t
|
||||
# RUN: not ld.lld %t --script %s -o %t1 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t --script %s -o /dev/null 2>&1 | FileCheck %s
|
||||
# CHECK: {{.*}}.test:8: unable to move location counter backward for: .text
|
||||
|
||||
SECTIONS {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# RUN: echo ".quad 1" >> %t.s
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t.s -o %t.o
|
||||
|
||||
# RUN: not ld.lld -o %t %t.o --script %s 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -o /dev/null %t.o --script %s 2>&1 | FileCheck %s
|
||||
|
||||
# Check we are able to catch 'ram' overflow caused by BYTE command.
|
||||
# CHECK: error: section '.foo' will not fit in region 'ram': overflowed by 1 bytes
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
||||
# RUN: echo "MEMORY { name : ORIGIN = DATA_SEGMENT_RELRO_END; }" > %t.script
|
||||
# RUN: not ld.lld -shared -o %t2 --script %t.script %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld -shared -o /dev/null --script %t.script %t 2>&1 | FileCheck %s
|
||||
# CHECK: error: {{.*}}.script:1: unable to calculate page size
|
||||
|
||||
# RUN: echo "MEMORY { name : ORIGIN = CONSTANT(COMMONPAGESIZE); }" > %t.script
|
||||
# RUN: not ld.lld -shared -o %t2 --script %t.script %t 2>&1 |\
|
||||
# RUN: not ld.lld -shared -o /dev/null --script %t.script %t 2>&1 |\
|
||||
# RUN: FileCheck %s --check-prefix=ERR2
|
||||
# ERR2: error: {{.*}}.script:1: unable to calculate page size
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
||||
# RUN: echo "MEMORY { name : ORIGIN = .; }" > %t.script
|
||||
# RUN: not ld.lld -shared -o %t2 --script %t.script %t 2>&1 |\
|
||||
# RUN: not ld.lld -shared -o /dev/null --script %t.script %t 2>&1 |\
|
||||
# RUN: FileCheck %s --check-prefix=ERR3
|
||||
# ERR3: error: {{.*}}.script:1: unable to get location counter value
|
||||
|
|
|
@ -49,21 +49,21 @@
|
|||
## Check bad `ORIGIN`.
|
||||
|
||||
# RUN: echo "MEMORY { ram (rwx) : XYZ = 0x8000 } }" > %t.script
|
||||
# RUN: not ld.lld -o %t2 --script %t.script %t 2>&1 \
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ERR1 %s
|
||||
# ERR1: {{.*}}.script:1: expected one of: ORIGIN, org, or o
|
||||
|
||||
## Check bad `LENGTH`.
|
||||
|
||||
# RUN: echo "MEMORY { ram (rwx) : ORIGIN = 0x8000, XYZ = 256K } }" > %t.script
|
||||
# RUN: not ld.lld -o %t2 --script %t.script %t 2>&1 \
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ERR2 %s
|
||||
# ERR2: {{.*}}.script:1: expected one of: LENGTH, len, or l
|
||||
|
||||
## Check duplicate regions.
|
||||
|
||||
# RUN: echo "MEMORY { ram (rwx) : o = 8, l = 256K ram (rx) : o = 0, l = 256K }" > %t.script
|
||||
# RUN: not ld.lld -o %t2 --script %t.script %t 2>&1 \
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ERR3 %s
|
||||
# ERR3: {{.*}}.script:1: region 'ram' already defined
|
||||
|
||||
|
@ -74,14 +74,14 @@
|
|||
# RUN: .text : { *(.text) } \
|
||||
# RUN: .data : { *(.data) } > ram \
|
||||
# RUN: }" > %t.script
|
||||
# RUN: not ld.lld -o %t2 --script %t.script %t 2>&1 \
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ERR4 %s
|
||||
# ERR4: {{.*}}: no memory region specified for section '.text'
|
||||
|
||||
## Check undeclared region.
|
||||
|
||||
# RUN: echo "SECTIONS { .text : { *(.text) } > ram }" > %t.script
|
||||
# RUN: not ld.lld -o %t2 --script %t.script %t 2>&1 \
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ERR5 %s
|
||||
# ERR5: {{.*}}: memory region 'ram' not declared
|
||||
|
||||
|
@ -92,14 +92,14 @@
|
|||
# RUN: .text : { *(.text) } > ram \
|
||||
# RUN: .data : { *(.data) } > ram \
|
||||
# RUN: }" > %t.script
|
||||
# RUN: not ld.lld -o %t2 --script %t.script %t 2>&1 \
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ERR6 %s
|
||||
# ERR6: {{.*}}: section '.data' will not fit in region 'ram': overflowed by 2049 bytes
|
||||
|
||||
## Check invalid region attributes.
|
||||
|
||||
# RUN: echo "MEMORY { ram (abc) : ORIGIN = 8000, LENGTH = 256K } }" > %t.script
|
||||
# RUN: not ld.lld -o %t2 --script %t.script %t 2>&1 \
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ERR7 %s
|
||||
# ERR7: {{.*}}.script:1: invalid memory region attribute
|
||||
|
||||
|
|
|
@ -39,17 +39,17 @@
|
|||
# ERR2: malformed number: 0x11k
|
||||
|
||||
# RUN: echo "SECTIONS { . = 0x11m; }" > %t4.script
|
||||
# RUN: not ld.lld %t --script %t4.script -o %t5 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t4.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=ERR3 %s
|
||||
# ERR3: malformed number: 0x11m
|
||||
|
||||
# RUN: echo "SECTIONS { . = 1zh; }" > %t5.script
|
||||
# RUN: not ld.lld %t --script %t5.script -o %t5 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t5.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=ERR4 %s
|
||||
# ERR4: malformed number: 1zh
|
||||
|
||||
# RUN: echo "SECTIONS { . = 1zk; }" > %t6.script
|
||||
# RUN: not ld.lld %t --script %t6.script -o %t6 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t6.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=ERR5 %s
|
||||
# ERR5: malformed number: 1zk
|
||||
|
||||
|
|
|
@ -89,42 +89,42 @@ SECTIONS {
|
|||
|
||||
## Mailformed number error.
|
||||
# RUN: echo "SECTIONS { . = 0x12Q41; }" > %t.script
|
||||
# RUN: not ld.lld %t --script %t.script -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=NUMERR %s
|
||||
# NUMERR: malformed number: 0x12Q41
|
||||
|
||||
## Missing closing bracket.
|
||||
# RUN: echo "SECTIONS { . = (1; }" > %t.script
|
||||
# RUN: not ld.lld %t --script %t.script -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=BRACKETERR %s
|
||||
# BRACKETERR: ) expected, but got ;
|
||||
|
||||
## Missing opening bracket.
|
||||
# RUN: echo "SECTIONS { . = 1); }" > %t.script
|
||||
# RUN: not ld.lld %t --script %t.script -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=BRACKETERR2 %s
|
||||
# BRACKETERR2: ; expected, but got )
|
||||
|
||||
## Empty expression.
|
||||
# RUN: echo "SECTIONS { . = ; }" > %t.script
|
||||
# RUN: not ld.lld %t --script %t.script -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=ERREXPR %s
|
||||
# ERREXPR: malformed number: ;
|
||||
|
||||
## Div by zero error.
|
||||
# RUN: echo "SECTIONS { . = 1 / 0; }" > %t.script
|
||||
# RUN: not ld.lld %t --script %t.script -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=DIVZERO %s
|
||||
# DIVZERO: {{.*}}.script:1: division by zero
|
||||
|
||||
## Mod by zero error.
|
||||
# RUN: echo "SECTIONS { . = 1 % 0; }" > %t.script
|
||||
# RUN: not ld.lld %t --script %t.script -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=MODZERO %s
|
||||
# MODZERO: {{.*}}.script:1: modulo by zero
|
||||
|
||||
## Broken ternary operator expression.
|
||||
# RUN: echo "SECTIONS { . = 1 ? 2; }" > %t.script
|
||||
# RUN: not ld.lld %t --script %t.script -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck --check-prefix=TERNERR %s
|
||||
# TERNERR: : expected, but got ;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# RUN: %t.o 2>&1 -verbose -error-limit=0 | FileCheck %s --check-prefix=DEFAULT
|
||||
|
||||
## Check --orphan-handling=error reports errors about orphans.
|
||||
# RUN: not ld.lld -shared --orphan-handling=error -o %t.out --script %t.script \
|
||||
# RUN: not ld.lld -shared --orphan-handling=error -o /dev/null --script %t.script \
|
||||
# RUN: %t.o 2>&1 -verbose -error-limit=0 | FileCheck %s --check-prefix=REPORT
|
||||
# REPORT: {{.*}}.o:(.text) is being placed in '.text'
|
||||
# REPORT-NEXT: {{.*}}.o:(.text.2) is being placed in '.text'
|
||||
|
@ -44,7 +44,7 @@
|
|||
# RUN: ld.lld -shared --orphan-handling=warn -o %t.out --script %t.script \
|
||||
# RUN: %t.o 2>&1 -verbose | FileCheck %s --check-prefix=REPORT
|
||||
|
||||
# RUN: not ld.lld --orphan-handling=foo -o %t.out --script %t.script %t.o 2>&1 \
|
||||
# RUN: not ld.lld --orphan-handling=foo -o /dev/null --script %t.script %t.o 2>&1 \
|
||||
# RUN: | FileCheck %s --check-prefix=UNKNOWN
|
||||
# UNKNOWN: unknown --orphan-handling mode: foo
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# RUN: .sec1 0x8000 : AT(0x8000) { sec1_start = .; *(.first_sec) sec1_end = .;} \
|
||||
# RUN: .sec2 0x8800 : AT(0x8080) { sec2_start = .; *(.second_sec) sec2_end = .;} \
|
||||
# RUN: }" > %t-lma.script
|
||||
# RUN: not ld.lld -o %t.so --script %t-lma.script %t.o -shared 2>&1 | FileCheck %s -check-prefix LMA-OVERLAP-ERR
|
||||
# RUN: not ld.lld -o /dev/null --script %t-lma.script %t.o -shared 2>&1 | FileCheck %s -check-prefix LMA-OVERLAP-ERR
|
||||
# LMA-OVERLAP-ERR: error: section .sec1 load address range overlaps with .sec2
|
||||
# LMA-OVERLAP-ERR-NEXT: >>> .sec1 range is [0x8000, 0x80FF]
|
||||
# LMA-OVERLAP-ERR-NEXT: >>> .sec2 range is [0x8080, 0x817F]
|
||||
|
@ -36,7 +36,7 @@
|
|||
# RUN: .sec1 0x8000 : AT(0x8000) { sec1_start = .; *(.first_sec) sec1_end = .;} \
|
||||
# RUN: .sec2 0x8020 : AT(0x8800) { sec2_start = .; *(.second_sec) sec2_end = .;} \
|
||||
# RUN: }" > %t-vaddr.script
|
||||
# RUN: not ld.lld -o %t.so --script %t-vaddr.script %t.o -shared 2>&1 | FileCheck %s -check-prefix VADDR-OVERLAP-ERR
|
||||
# RUN: not ld.lld -o /dev/null --script %t-vaddr.script %t.o -shared 2>&1 | FileCheck %s -check-prefix VADDR-OVERLAP-ERR
|
||||
# VADDR-OVERLAP-ERR: error: section .sec1 virtual address range overlaps with .sec2
|
||||
# VADDR-OVERLAP-ERR-NEXT: >>> .sec1 range is [0x8000, 0x80FF]
|
||||
# VADDR-OVERLAP-ERR-NEXT: >>> .sec2 range is [0x8020, 0x811F]
|
||||
|
@ -63,7 +63,7 @@
|
|||
# RUN: .sec2 0x8040 : { sec2_start = .; *(.second_sec) sec2_end = .;} \
|
||||
# RUN: }" > %t-both-overlap.script
|
||||
|
||||
# RUN: not ld.lld -o %t.so --script %t-both-overlap.script %t.o -shared 2>&1 | FileCheck %s -check-prefix BOTH-OVERLAP-ERR
|
||||
# RUN: not ld.lld -o /dev/null --script %t-both-overlap.script %t.o -shared 2>&1 | FileCheck %s -check-prefix BOTH-OVERLAP-ERR
|
||||
|
||||
# BOTH-OVERLAP-ERR: error: section .sec1 file range overlaps with .sec2
|
||||
# BOTH-OVERLAP-ERR-NEXT: >>> .sec1 range is [0x2000, 0x20FF]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.o
|
||||
# RUN: not ld.lld %t.o --script %s -o %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.o --script %s -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: {{.*}}.test:{{.*}}: { expected, but got 0x3000
|
||||
# CHECK-NEXT: >>> .out.aaa 0x3000 : { *(.aaa) }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# REQUIRES: x86
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.o
|
||||
# RUN: not ld.lld %t.o --script %s -o %t 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.o --script %s -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: {{.*}}.test:{{.*}}: { expected, but got AX
|
||||
# CHECK-NEXT: >>> .out.aaa { *(.aaa) } > AX AT>FLASH
|
||||
|
|
|
@ -50,11 +50,11 @@
|
|||
|
||||
# CHECK-SCRIPT: 0000000000004000 *ABS* 00000000 symbol
|
||||
|
||||
# RUN: not ld.lld -z max-page-size=0x1001 -o %t1 --script %t.script %t 2>&1 \
|
||||
# RUN: not ld.lld -z max-page-size=0x1001 -o /dev/null --script %t.script %t 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ERR1 %s
|
||||
# ERR1: max-page-size: value isn't a power of 2
|
||||
|
||||
# RUN: not ld.lld -z max-page-size=-0x1000 -o %t1 --script %t.script %t 2>&1 \
|
||||
# RUN: not ld.lld -z max-page-size=-0x1000 -o /dev/null --script %t.script %t 2>&1 \
|
||||
# RUN: | FileCheck -check-prefix=ERR2 %s
|
||||
# ERR2: invalid max-page-size: -0x1000
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
## created and error is not reported.
|
||||
# RUN: echo "PHDRS { all PT_LOAD; } \
|
||||
# RUN: SECTIONS { .baz : {*(.foo.*)} :bar }" > %t.script
|
||||
# RUN: not ld.lld -o %t1 --script %t.script %t 2>&1 | FileCheck --check-prefix=BADHDR %s
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t 2>&1 | FileCheck --check-prefix=BADHDR %s
|
||||
|
||||
# CHECK: ProgramHeaders [
|
||||
# CHECK-NEXT: ProgramHeader {
|
||||
|
|
|
@ -28,20 +28,20 @@
|
|||
|
||||
## Redefinition of region.
|
||||
# RUN: echo "REGION_ALIAS (\"ROM\", ROM);" > %t.script.inc
|
||||
# RUN: not ld.lld %t --script %t.script -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck %s --check-prefix=ERR1
|
||||
# ERR1: {{.*}}script.inc:1: redefinition of memory region 'ROM'
|
||||
|
||||
## Redefinition of alias.
|
||||
# RUN: echo "REGION_ALIAS (\"ALIAS_TEXT\", ROM);" > %t.script.inc
|
||||
# RUN: echo "REGION_ALIAS (\"ALIAS_TEXT\", ROM);" >> %t.script.inc
|
||||
# RUN: not ld.lld %t --script %t.script -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck %s --check-prefix=ERR2
|
||||
# ERR2: {{.*}}script.inc:2: redefinition of memory region 'ALIAS_TEXT'
|
||||
|
||||
## Attemp to create an alias for undefined region.
|
||||
# RUN: echo "REGION_ALIAS (\"ALIAS_TEXT\", FOO);" > %t.script.inc
|
||||
# RUN: not ld.lld %t --script %t.script -o %t2 2>&1 | \
|
||||
# RUN: not ld.lld %t --script %t.script -o /dev/null 2>&1 | \
|
||||
# RUN: FileCheck %s --check-prefix=ERR3
|
||||
# ERR3: {{.*}}script.inc:1: memory region 'FOO' is not defined
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
## Invalid hex value:
|
||||
# RUN: echo "SECTIONS { .mysec : { *(.mysec*) } =0x99XX }" > %t.script
|
||||
# RUN: not ld.lld -o %t.out --script %t.script %t 2>&1 \
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t 2>&1 \
|
||||
# RUN: | FileCheck --check-prefix=ERR2 %s
|
||||
# ERR2: malformed number: 0x99XX
|
||||
|
||||
|
@ -58,12 +58,12 @@
|
|||
|
||||
## Check we report an error if expression value is larger than 32-bits.
|
||||
# RUN: echo "SECTIONS { .mysec : { *(.mysec*) } =(0x11 << 32) }" > %t.script
|
||||
# RUN: not ld.lld -o %t.out --script %t.script %t 2>&1 | FileCheck --check-prefix=ERR3 %s
|
||||
# RUN: not ld.lld -o /dev/null --script %t.script %t 2>&1 | FileCheck --check-prefix=ERR3 %s
|
||||
# ERR3: filler expression result does not fit 32-bit: 0x1100000000
|
||||
|
||||
## Check we report an error if an expression use a symbol.
|
||||
# RUN: echo "SECTIONS { foo = 0x11; .mysec : { *(.mysec*) } = foo }" > %t.script
|
||||
# RUN: not ld.lld -o %t.out %t --script %t.script 2>&1 | FileCheck --check-prefix=ERR4 %s
|
||||
# RUN: not ld.lld -o /dev/null %t --script %t.script 2>&1 | FileCheck --check-prefix=ERR4 %s
|
||||
# ERR4: symbol not found: foo
|
||||
|
||||
.section .mysec.1,"a"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
# CHECK-NEXT: ]
|
||||
|
||||
# RUN: echo "bar = und; VERSION { V { global: foo; bar; local: *; }; }" > %t.script
|
||||
# RUN: not ld.lld -T %t.script -shared --no-undefined-version %t.o -o %t.so \
|
||||
# RUN: not ld.lld -T %t.script -shared --no-undefined-version %t.o -o /dev/null \
|
||||
# RUN: 2>&1 | FileCheck --check-prefix=ERR %s
|
||||
# ERR: symbol not found: und
|
||||
|
||||
|
|
|
@ -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 2>&1 | FileCheck %s
|
||||
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK: error: undefined symbol: foo
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue