File: group.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (64 lines) | stat: -rw-r--r-- 2,166 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# REQUIRES: x86
# UNSUPPORTED: system-windows

# RUN: rm -rf %t.dir && mkdir %t.dir
# RUN: rm -rf %t && split-file %s %t && cd %t
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o a.o
# RUN: llvm-mc -filetype=obj -triple=x86_64 %p/Inputs/libsearch-st.s -o b.o
# RUN: llvm-ar rc %t.dir/libxyz.a b.o

# RUN: echo 'GROUP("a.o")' > %t.t
# RUN: ld.lld -o %t2 %t.t
# RUN: llvm-readobj %t2 > /dev/null

# RUN: echo 'INPUT("a.o")' > %t.t
# RUN: ld.lld -o %t2 %t.t
# RUN: llvm-readobj %t2 > /dev/null

# RUN: echo 'GROUP("a.o" libxyz.a )' > %t.t
# RUN: not ld.lld -o /dev/null %t.t 2>/dev/null
# RUN: ld.lld -o %t2 %t.t -L%t.dir
# RUN: llvm-readobj %t2 > /dev/null

# RUN: echo 'GROUP("a.o" =libxyz.a )' > %t.t
# RUN: not ld.lld -o /dev/null %t.t  2>/dev/null
# RUN: ld.lld -o %t2 %t.t --sysroot=%t.dir
# RUN: llvm-readobj %t2 > /dev/null

# RUN: echo 'GROUP("a.o" -lxyz )' > %t.t
# RUN: not ld.lld -o /dev/null %t.t  2>/dev/null
# RUN: ld.lld -o %t2 %t.t -L%t.dir
# RUN: llvm-readobj %t2 > /dev/null

# RUN: echo 'GROUP("a.o" libxyz.a )' > %t.t
# RUN: not ld.lld -o /dev/null %t.t  2>/dev/null
# RUN: ld.lld -o %t2 %t.t -L%t.dir
# RUN: llvm-readobj %t2 > /dev/null

# RUN: echo 'GROUP("a.o" /libxyz.a )' > %t.t
# RUN: echo 'GROUP("%t/a.o" /libxyz.a )' > %t.dir/xyz.t
# RUN: not ld.lld -o /dev/null %t.t 2>&1 | FileCheck %s --check-prefix=CANNOT_OPEN -DFILE=/libxyz.a
# RUN: not ld.lld -o /dev/null %t.t --sysroot=%t.dir 2>&1 | FileCheck %s --check-prefix=CANNOT_OPEN -DFILE=/libxyz.a

## Since %t.dir/%t does not exist, report an error, instead of falling back to %t
## without the syroot prefix.
# RUN: not ld.lld -o /dev/null %t.dir/xyz.t --sysroot=%t.dir 2>&1 | FileCheck %s --check-prefix=CANNOT_FIND_SYSROOT -DTMP=%t/a.o

# CANNOT_FIND_SYSROOT:      error: {{.*}}xyz.t:1: cannot find [[TMP]] inside {{.*}}.dir
# CANNOT_FIND_SYSROOT-NEXT: >>> GROUP({{.*}}

# RUN: echo 'GROUP("2.t")' > 1.t
# RUN: echo 'GROUP("a.o")' > 2.t
# RUN: ld.lld 1.t
# RUN: llvm-readobj a.out > /dev/null

# RUN: echo 'GROUP(AS_NEEDED("a.o"))' > 1.t
# RUN: ld.lld 1.t
# RUN: llvm-readobj a.out > /dev/null

# CANNOT_OPEN: error: cannot open [[FILE]]: {{.*}}

#--- a.s
.globl _start
_start:
  ret