File: zos-ld.c

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 (123 lines) | stat: -rw-r--r-- 5,297 bytes parent folder | download | duplicates (3)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// General tests that ld invocations for z/OS are valid.

// 1. General C link for executable
// RUN: %clang -### --target=s390x-ibm-zos %s 2>&1 \
// RUN:   | FileCheck --check-prefix=C-LD %s

// C-LD: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
// C-LD: "AMODE=64,LIST,DYNAM=DLL,MSGLEVEL=4,CASE=MIXED,REUS=RENT"
// C-LD-SAME: "-e" "CELQSTRT"
// C-LD-SAME: "-O" "CELQSTRT"
// C-LD-SAME: "-u" "CELQMAIN"
// C-LD-SAME: "-x" "/dev/null"
// C-LD-SAME: "-S" "//'CEE.SCEEBND2'"
// C-LD-SAME: "-S" "//'SYS1.CSSLIB'"
// C-LD-SAME: "//'CEE.SCEELIB(CELQS001)'"
// C-LD-SAME: "//'CEE.SCEELIB(CELQS003)'"
// C-LD-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}zos{{/|\\\\}}libclang_rt.builtins-s390x.a"

// 2. General C link for dll
// RUN: %clang -### --shared --target=s390x-ibm-zos %s 2>&1 \
// RUN:   | FileCheck --check-prefix=C-LD-DLL %s

// C-LD-DLL: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
// C-LD-DLL: "AMODE=64,LIST,DYNAM=DLL,MSGLEVEL=4,CASE=MIXED,REUS=RENT"
// C-LD-DLL-NOT: "-e" "CELQSTRT"
// C-LD-DLL-NOT: "-O" "CELQSTRT"
// C-LD-DLL-NOT: "-u" "CELQMAIN"
// C-LD-DLL-SAME: "-x" "{{.*}}.x"
// C-LD-DLL-SAME: "-S" "//'CEE.SCEEBND2'"
// C-LD-DLL-SAME: "-S" "//'SYS1.CSSLIB'"
// C-LD-DLL-SAME: "//'CEE.SCEELIB(CELQS001)'"
// C-LD-DLL-SAME: "//'CEE.SCEELIB(CELQS003)'"
// C-LD-DLL-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}zos{{/|\\\\}}libclang_rt.builtins-s390x.a"

// 3. General C++ link for executable
// RUN: %clangxx -### --target=s390x-ibm-zos %s 2>&1 \
// RUN:   | FileCheck --check-prefix=CXX-LD %s

// CXX-LD: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
// CXX-LD: "AMODE=64,LIST,DYNAM=DLL,MSGLEVEL=4,CASE=MIXED,REUS=RENT"
// CXX-LD-SAME: "-e" "CELQSTRT"
// CXX-LD-SAME: "-O" "CELQSTRT"
// CXX-LD-SAME: "-u" "CELQMAIN"
// CXX-LD-SAME: "-x" "/dev/null"
// CXX-LD-SAME: "-S" "//'CEE.SCEEBND2'"
// CXX-LD-SAME: "-S" "//'SYS1.CSSLIB'"
// CXX-LD-SAME: "//'CEE.SCEELIB(CELQS001)'"
// CXX-LD-SAME: "//'CEE.SCEELIB(CELQS003)'"
// CXX-LD-SAME: "//'CEE.SCEELIB(CRTDQCXE)'"
// CXX-LD-SAME: "//'CEE.SCEELIB(CRTDQCXS)'"
// CXX-LD-SAME: "//'CEE.SCEELIB(CRTDQCXP)'"
// CXX-LD-SAME: "//'CEE.SCEELIB(CRTDQCXA)'"
// CXX-LD-SAME: "//'CEE.SCEELIB(CRTDQXLA)'"
// CXX-LD-SAME: "//'CEE.SCEELIB(CRTDQUNW)'"
// CXX-LD-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}zos{{/|\\\\}}libclang_rt.builtins-s390x.a"

// 4. General C++ link for dll
// RUN: %clangxx -### --shared --target=s390x-ibm-zos %s 2>&1 \
// RUN:   | FileCheck --check-prefix=CXX-LD-DLL %s

// CXX-LD-DLL: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
// CXX-LD-DLL: "AMODE=64,LIST,DYNAM=DLL,MSGLEVEL=4,CASE=MIXED,REUS=RENT"
// CXX-LD-DLL-NOT: "-e" "CELQSTRT"
// CXX-LD-DLL-NOT: "-O" "CELQSTRT"
// CXX-LD-DLL-NOT: "-u" "CELQMAIN"
// CXX-LD-DLL-SAME: "-x" "{{.*}}.x"
// CXX-LD-DLL-SAME: "-S" "//'CEE.SCEEBND2'"
// CXX-LD-DLL-SAME: "-S" "//'SYS1.CSSLIB'"
// CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CELQS001)'"
// CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CELQS003)'"
// CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CRTDQCXE)'"
// CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CRTDQCXS)'"
// CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CRTDQCXP)'"
// CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CRTDQCXA)'"
// CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CRTDQXLA)'"
// CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CRTDQUNW)'"
// CXX-LD-DLL-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}zos{{/|\\\\}}libclang_rt.builtins-s390x.a"

// 5. C++ link for executable w/ -mzos-hlq-le=, -mzos-hlq-csslib=
// RUN: %clangxx -### --target=s390x-ibm-zos %s 2>&1 \
// RUN:   -mzos-hlq-le=AAAA -mzos-hlq-csslib=BBBB \
// RUN:   | FileCheck --check-prefix=CXX-LD5 %s

// CXX-LD5: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
// CXX-LD5: "AMODE=64,LIST,DYNAM=DLL,MSGLEVEL=4,CASE=MIXED,REUS=RENT"
// CXX-LD5-SAME: "-e" "CELQSTRT"
// CXX-LD5-SAME: "-O" "CELQSTRT"
// CXX-LD5-SAME: "-u" "CELQMAIN"
// CXX-LD5-SAME: "-x" "/dev/null"
// CXX-LD5-SAME: "-S" "//'AAAA.SCEEBND2'"
// CXX-LD5-SAME: "-S" "//'BBBB.CSSLIB'"
// CXX-LD5-SAME: "//'AAAA.SCEELIB(CELQS001)'"
// CXX-LD5-SAME: "//'AAAA.SCEELIB(CELQS003)'"
// CXX-LD5-SAME: "//'AAAA.SCEELIB(CRTDQCXE)'"
// CXX-LD5-SAME: "//'AAAA.SCEELIB(CRTDQCXS)'"
// CXX-LD5-SAME: "//'AAAA.SCEELIB(CRTDQCXP)'"
// CXX-LD5-SAME: "//'AAAA.SCEELIB(CRTDQCXA)'"
// CXX-LD5-SAME: "//'AAAA.SCEELIB(CRTDQXLA)'"
// CXX-LD5-SAME: "//'AAAA.SCEELIB(CRTDQUNW)'"
// CXX-LD5-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}zos{{/|\\\\}}libclang_rt.builtins-s390x.a"

// 6. C++ link for executable w/ -mzos-hlq-clang=
// RUN: %clangxx -### --target=s390x-ibm-zos %s 2>&1 \
// RUN:   -mzos-hlq-clang=AAAA \
// RUN:   | FileCheck --check-prefix=CXX-LD6 %s

// CXX-LD6: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
// CXX-LD6: "AMODE=64,LIST,DYNAM=DLL,MSGLEVEL=4,CASE=MIXED,REUS=RENT"
// CXX-LD6-SAME: "-e" "CELQSTRT"
// CXX-LD6-SAME: "-O" "CELQSTRT"
// CXX-LD6-SAME: "-u" "CELQMAIN"
// CXX-LD6-SAME: "-x" "/dev/null"
// CXX-LD6-SAME: "-S" "//'CEE.SCEEBND2'"
// CXX-LD6-SAME: "-S" "//'SYS1.CSSLIB'"
// CXX-LD6-SAME: "//'CEE.SCEELIB(CELQS001)'"
// CXX-LD6-SAME: "//'CEE.SCEELIB(CELQS003)'"
// CXX-LD6-SAME: "//'AAAA.SCEELIB(CRTDQCXE)'"
// CXX-LD6-SAME: "//'AAAA.SCEELIB(CRTDQCXS)'"
// CXX-LD6-SAME: "//'AAAA.SCEELIB(CRTDQCXP)'"
// CXX-LD6-SAME: "//'AAAA.SCEELIB(CRTDQCXA)'"
// CXX-LD6-SAME: "//'AAAA.SCEELIB(CRTDQXLA)'"
// CXX-LD6-SAME: "//'AAAA.SCEELIB(CRTDQUNW)'"
// CXX-LD6-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}zos{{/|\\\\}}libclang_rt.builtins-s390x.a"