Skip to content

Commit 34bdddf

Browse files
committed
[ELF][test] Split basic.s
1 parent 018ad3b commit 34bdddf

File tree

5 files changed

+18
-32
lines changed

5 files changed

+18
-32
lines changed

lld/test/ELF/basic.s

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -230,40 +230,8 @@ _start:
230230
# RUN: FileCheck --check-prefix=CANNOT_OPEN %s
231231
# CANNOT_OPEN: cannot open {{.*}}.no.such.file: {{[Nn]}}o such file or directory
232232

233-
# RUN: not ld.lld %t -o 2>&1 | FileCheck --check-prefix=NO_O_VAL %s
234-
# NO_O_VAL: -o: missing argument
235-
236233
# RUN: not ld.lld --foo 2>&1 | FileCheck --check-prefix=UNKNOWN %s
237234
# UNKNOWN: unknown argument '--foo'
238235

239-
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
240-
# RUN: not ld.lld %t %t -o /dev/null 2>&1 | FileCheck --check-prefix=DUP %s
241-
# DUP: duplicate symbol: _start
242-
# DUP-NEXT: >>> defined at {{.*}}:(.text+0x0)
243-
# DUP-NEXT: >>> defined at {{.*}}:(.text+0x0)
244-
245236
# RUN: not ld.lld %t -o /dev/null -m wrong_emul_fbsd 2>&1 | FileCheck --check-prefix=UNKNOWN_EMUL %s
246237
# UNKNOWN_EMUL: unknown emulation: wrong_emul_fbsd
247-
248-
# RUN: not ld.lld %t --lto-partitions=0 2>&1 | FileCheck --check-prefix=NOTHREADS %s
249-
# RUN: not ld.lld %t --plugin-opt=lto-partitions=0 2>&1 | FileCheck --check-prefix=NOTHREADS %s
250-
# NOTHREADS: --lto-partitions: number of threads must be > 0
251-
252-
# RUN: ld.lld %t --thinlto-jobs=0 -verbose 2>&1 | FileCheck --check-prefix=THREADSTHIN %s
253-
# RUN: ld.lld %t --thinlto-jobs=1 -verbose 2>&1 | FileCheck --check-prefix=THREADSTHIN %s
254-
# RUN: ld.lld %t --thinlto-jobs=2 -verbose 2>&1 | FileCheck --check-prefix=THREADSTHIN %s
255-
# RUN: ld.lld %t --thinlto-jobs=all -verbose 2>&1 | FileCheck --check-prefix=THREADSTHIN %s
256-
# RUN: ld.lld %t --thinlto-jobs=1000 -verbose 2>&1 | FileCheck --check-prefix=THREADSTHIN %s
257-
# THREADSTHIN: basic.s.tmp
258-
# RUN: not ld.lld %t --thinlto-jobs=foo -verbose 2>&1 | FileCheck --check-prefix=BADTHREADSTHIN %s
259-
# BADTHREADSTHIN: error: --thinlto-jobs: invalid job count: foo
260-
261-
# RUN: ld.lld %t --plugin-opt=jobs=0 -verbose 2>&1 | FileCheck --check-prefix=THREADSTHIN %s
262-
# RUN: ld.lld %t --plugin-opt=jobs=1 -verbose 2>&1 | FileCheck --check-prefix=THREADSTHIN %s
263-
# RUN: ld.lld %t --plugin-opt=jobs=2 -verbose 2>&1 | FileCheck --check-prefix=THREADSTHIN %s
264-
# RUN: ld.lld %t --plugin-opt=jobs=all -verbose 2>&1 | FileCheck --check-prefix=THREADSTHIN %s
265-
# RUN: ld.lld %t --plugin-opt=jobs=1000 -verbose 2>&1 | FileCheck --check-prefix=THREADSTHIN %s
266-
# RUN: not ld.lld %t --plugin-opt=jobs=foo -verbose 2>&1 | FileCheck --check-prefix=BADTHREADSTHIN %s
267-
268-
# RUN: not ld.lld %t -z ifunc-noplt -z text 2>&1 | FileCheck --check-prefix=NOIFUNCPLTNOTEXTREL %s
269-
# NOIFUNCPLTNOTEXTREL: -z text and -z ifunc-noplt may not be used together

lld/test/ELF/default-output.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
# RUN: ld.lld %t
1010
# RUN: llvm-readobj a.out > /dev/null 2>&1
1111

12+
# RUN: not ld.lld %t -o 2>&1 | FileCheck --check-prefix=NO_O_VAL %s
13+
# NO_O_VAL: error: -o: missing argument
14+
1215
.globl _start
1316
_start:
1417
mov $60, %rax

lld/test/ELF/gnu-ifunc-noplt.s

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-freebsd %S/Inputs/shared2-x86-64.s -o %t1.o
66
// RUN: ld.lld %t1.o --shared -soname=so -o %t.so
77
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-freebsd %s -o %t.o
8+
9+
/// The default -z text is not compatible with -z ifunc-noplt.
10+
// RUN: not ld.lld -z ifunc-noplt %t.o -o /dev/null 2>&1| FileCheck --check-prefix=INCOMPATIBLE %s
11+
// RUN: not ld.lld -z ifunc-noplt -z text %t.o -o /dev/null 2>&1| FileCheck --check-prefix=INCOMPATIBLE %s
12+
// INCOMPATIBLE: -z text and -z ifunc-noplt may not be used together
13+
814
// RUN: ld.lld -z ifunc-noplt -z notext --hash-style=sysv %t.so %t.o -o %tout
915
// RUN: llvm-objdump -d --no-show-raw-insn %tout | FileCheck %s --check-prefix=DISASM
1016
// RUN: llvm-readobj -r --dynamic-table %tout | FileCheck %s

lld/test/ELF/lto/parallel.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
; RUN: llvm-nm %t.lto.o | FileCheck --check-prefix=CHECK0 %s
66
; RUN: llvm-nm %t1.lto.o | FileCheck --check-prefix=CHECK1 %s
77

8+
; RUN: not ld.lld --lto-partitions=0 %t.bc -o /dev/null 2>&1 | FileCheck --check-prefix=INVALID %s
9+
; INVALID: --lto-partitions: number of threads must be > 0
10+
811
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
912
target triple = "x86_64-unknown-linux-gnu"
1013

lld/test/ELF/lto/thinlto.ll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
1717
; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
1818

19+
;; --plugin-opt=jobs= is an alias.
20+
; RUN: rm -f %t31.lto.o %t32.lto.o
21+
; RUN: ld.lld -save-temps --plugin-opt=jobs=2 -shared %t1.o %t2.o -o %t3
22+
; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
23+
; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
24+
1925
; Test with all threads, on all cores, on all CPU sockets
2026
; RUN: rm -f %t31.lto.o %t32.lto.o
2127
; RUN: ld.lld -save-temps --thinlto-jobs=all -shared %t1.o %t2.o -o %t3

0 commit comments

Comments
 (0)