authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-01-21 14:27:05-05:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2025-01-21 14:27:05-05:00
logb31a2c95550e0fd6ee0b1e8908fad69d364ce6ab
treef21c96068ecc965008adf0bd58633b1c7274a02b
parent0bacb79c090aabb367987ed0cff3982b84b8a4f7
parent874e17fe608a7b8d4324dada32664fcfe44978cd
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #22541 from ziglang/pipeline

Compilation pipeline: spawn Jobs earlier that produce linker inputs

61 files changed, 235 insertions(+), 2494 deletions(-)

lib/libc/glibc/sysdeps/aarch64/crti.S deleted-103
......@@ -1,103 +0,0 @@
1/* Special .init and .fini section support for AArch64.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 In addition to the permissions in the GNU Lesser General Public
12 License, the Free Software Foundation gives you unlimited
13 permission to link the compiled version of this file with other
14 programs, and to distribute those programs without any restriction
15 coming from the use of this file. (The GNU Lesser General Public
16 License restrictions do apply in other respects; for example, they
17 cover modification of the file, and distribution when not linked
18 into another program.)
19
20 Note that people who make modified versions of this file are not
21 obligated to grant this special exception for their modified
22 versions; it is their choice whether to do so. The GNU Lesser
23 General Public License gives permission to release a modified
24 version without this exception; this exception also makes it
25 possible to release a modified version which carries forward this
26 exception.
27
28 The GNU C Library is distributed in the hope that it will be useful,
29 but WITHOUT ANY WARRANTY; without even the implied warranty of
30 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31 Lesser General Public License for more details.
32
33 You should have received a copy of the GNU Lesser General Public
34 License along with the GNU C Library; if not, see
35 <https://www.gnu.org/licenses/>. */
36
37/* crti.S puts a function prologue at the beginning of the .init and
38 .fini sections and defines global symbols for those addresses, so
39 they can be called as functions. The symbols _init and _fini are
40 magic and cause the linker to emit DT_INIT and DT_FINI. */
41
42#include <sysdep.h>
43#include <libc-symbols.h>
44
45#ifndef PREINIT_FUNCTION
46# define PREINIT_FUNCTION __gmon_start__
47#endif
48
49#ifndef PREINIT_FUNCTION_WEAK
50# define PREINIT_FUNCTION_WEAK 1
51#endif
52
53#if PREINIT_FUNCTION_WEAK
54 weak_extern (PREINIT_FUNCTION)
55#else
56 .hidden PREINIT_FUNCTION
57#endif
58
59#if PREINIT_FUNCTION_WEAK
60 .align 2
61 .type call_weak_fn, %function
62call_weak_fn:
63 adrp x0, :got:PREINIT_FUNCTION
64 ldr PTR_REG (0), [x0, #:got_lo12:PREINIT_FUNCTION]
65 cbz x0, 1f
66 b PREINIT_FUNCTION
671:
68 RET
69 .size call_weak_fn, .-call_weak_fn
70#endif
71
72 .section .init,"ax",%progbits
73 .align 2
74 .global _init
75 .hidden _init
76 .type _init, %function
77_init:
78#if HAVE_AARCH64_PAC_RET
79 PACIASP
80#else
81 BTI_C
82#endif
83 stp x29, x30, [sp, -16]!
84 mov x29, sp
85#if PREINIT_FUNCTION_WEAK
86 bl call_weak_fn
87#else
88 bl PREINIT_FUNCTION
89#endif
90
91 .section .fini,"ax",%progbits
92 .align 2
93 .global _fini
94 .hidden _fini
95 .type _fini, %function
96_fini:
97#if HAVE_AARCH64_PAC_RET
98 PACIASP
99#else
100 BTI_C
101#endif
102 stp x29, x30, [sp, -16]!
103 mov x29, sp
lib/libc/glibc/sysdeps/aarch64/crtn.S deleted-54
......@@ -1,54 +0,0 @@
1/* Special .init and .fini section support for AArch64.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 In addition to the permissions in the GNU Lesser General Public
12 License, the Free Software Foundation gives you unlimited
13 permission to link the compiled version of this file with other
14 programs, and to distribute those programs without any restriction
15 coming from the use of this file. (The GNU Lesser General Public
16 License restrictions do apply in other respects; for example, they
17 cover modification of the file, and distribution when not linked
18 into another program.)
19
20 Note that people who make modified versions of this file are not
21 obligated to grant this special exception for their modified
22 versions; it is their choice whether to do so. The GNU Lesser
23 General Public License gives permission to release a modified
24 version without this exception; this exception also makes it
25 possible to release a modified version which carries forward this
26 exception.
27
28 The GNU C Library is distributed in the hope that it will be useful,
29 but WITHOUT ANY WARRANTY; without even the implied warranty of
30 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31 Lesser General Public License for more details.
32
33 You should have received a copy of the GNU Lesser General Public
34 License along with the GNU C Library; if not, see
35 <https://www.gnu.org/licenses/>. */
36
37/* crtn.S puts function epilogues in the .init and .fini sections
38 corresponding to the prologues in crti.S. */
39
40#include <sysdep.h>
41
42 .section .init,"ax",%progbits
43 ldp x29, x30, [sp], 16
44#if HAVE_AARCH64_PAC_RET
45 AUTIASP
46#endif
47 RET
48
49 .section .fini,"ax",%progbits
50 ldp x29, x30, [sp], 16
51#if HAVE_AARCH64_PAC_RET
52 AUTIASP
53#endif
54 RET
lib/libc/glibc/sysdeps/arm/crti.S deleted-97
......@@ -1,97 +0,0 @@
1/* Special .init and .fini section support for ARM.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crti.S puts a function prologue at the beginning of the .init and
37 .fini sections and defines global symbols for those addresses, so
38 they can be called as functions. The symbols _init and _fini are
39 magic and cause the linker to emit DT_INIT and DT_FINI. */
40
41/* Always build .init and .fini sections in ARM mode. */
42#define NO_THUMB
43#include <libc-symbols.h>
44#include <sysdep.h>
45
46#ifndef PREINIT_FUNCTION
47# define PREINIT_FUNCTION __gmon_start__
48#endif
49
50#ifndef PREINIT_FUNCTION_WEAK
51# define PREINIT_FUNCTION_WEAK 1
52#endif
53
54#if PREINIT_FUNCTION_WEAK
55 weak_extern (PREINIT_FUNCTION)
56#else
57 .hidden PREINIT_FUNCTION
58#endif
59
60#if PREINIT_FUNCTION_WEAK
61 .p2align 2
62 .type call_weak_fn, %function
63call_weak_fn:
64 ldr r3, .LGOT
65 ldr r2, .LGOT+4
66.LPIC:
67 add r3, pc, r3
68 ldr r2, [r3, r2]
69 cmp r2, #0
70 bxeq lr
71 b PREINIT_FUNCTION
72 .p2align 2
73.LGOT:
74 .word _GLOBAL_OFFSET_TABLE_-(.LPIC+8)
75 .word PREINIT_FUNCTION(GOT)
76#endif
77
78 .section .init,"ax",%progbits
79 .p2align 2
80 .globl _init
81 .hidden _init
82 .type _init, %function
83_init:
84 push {r3, lr}
85#if PREINIT_FUNCTION_WEAK
86 bl call_weak_fn
87#else
88 bl PREINIT_FUNCTION
89#endif
90
91 .section .fini,"ax",%progbits
92 .p2align 2
93 .globl _fini
94 .hidden _fini
95 .type _fini, %function
96_fini:
97 push {r3, lr}
lib/libc/glibc/sysdeps/arm/crtn.S deleted-57
......@@ -1,57 +0,0 @@
1/* Special .init and .fini section support for ARM.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* Always build .init and .fini sections in ARM mode. */
37#define NO_THUMB
38#include <sysdep.h>
39
40/* crtn.S puts function epilogues in the .init and .fini sections
41 corresponding to the prologues in crti.S. */
42
43 .section .init,"ax",%progbits
44#ifdef __ARM_ARCH_4T__
45 pop {r3, lr}
46 bx lr
47#else
48 pop {r3, pc}
49#endif
50
51 .section .fini,"ax",%progbits
52#ifdef __ARM_ARCH_4T__
53 pop {r3, lr}
54 bx lr
55#else
56 pop {r3, pc}
57#endif
lib/libc/glibc/sysdeps/i386/crti.S deleted-86
......@@ -1,86 +0,0 @@
1/* Special .init and .fini section support for x86.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library; if not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crti.S puts a function prologue at the beginning of the .init and
37 .fini sections and defines global symbols for those addresses, so
38 they can be called as functions. The symbols _init and _fini are
39 magic and cause the linker to emit DT_INIT and DT_FINI. */
40
41#include <libc-symbols.h>
42#include <sysdep.h>
43
44#ifndef PREINIT_FUNCTION
45# define PREINIT_FUNCTION __gmon_start__
46#endif
47
48#ifndef PREINIT_FUNCTION_WEAK
49# define PREINIT_FUNCTION_WEAK 1
50#endif
51
52#if PREINIT_FUNCTION_WEAK
53 weak_extern (PREINIT_FUNCTION)
54#else
55 .hidden PREINIT_FUNCTION
56#endif
57
58 .section .init,"ax",@progbits
59 .p2align 2
60 .globl _init
61 .hidden _init
62 .type _init, @function
63_init:
64 pushl %ebx
65 /* Maintain 16-byte stack alignment for called functions. */
66 subl $8, %esp
67 LOAD_PIC_REG (bx)
68#if PREINIT_FUNCTION_WEAK
69 movl PREINIT_FUNCTION@GOT(%ebx), %eax
70 testl %eax, %eax
71 je .Lno_weak_fn
72 call *%eax
73.Lno_weak_fn:
74#else
75 call PREINIT_FUNCTION
76#endif
77
78 .section .fini,"ax",@progbits
79 .p2align 2
80 .globl _fini
81 .hidden _fini
82 .type _fini, @function
83_fini:
84 pushl %ebx
85 subl $8, %esp
86 LOAD_PIC_REG (bx)
lib/libc/glibc/sysdeps/i386/crtn.S deleted-47
......@@ -1,47 +0,0 @@
1/* Special .init and .fini section support for x86.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library; if not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crtn.S puts function epilogues in the .init and .fini sections
37 corresponding to the prologues in crti.S. */
38
39 .section .init,"ax",@progbits
40 addl $8, %esp
41 popl %ebx
42 ret
43
44 .section .fini,"ax",@progbits
45 addl $8, %esp
46 popl %ebx
47 ret
lib/libc/glibc/sysdeps/m68k/crti.S deleted-84
......@@ -1,84 +0,0 @@
1/* Special .init and .fini section support for m68k.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crti.S puts a function prologue at the beginning of the .init and
37 .fini sections and defines global symbols for those addresses, so
38 they can be called as functions. The symbols _init and _fini are
39 magic and cause the linker to emit DT_INIT and DT_FINI. */
40
41#include <libc-symbols.h>
42#include <sysdep.h>
43
44#ifndef PREINIT_FUNCTION
45# define PREINIT_FUNCTION __gmon_start__
46#endif
47
48#ifndef PREINIT_FUNCTION_WEAK
49# define PREINIT_FUNCTION_WEAK 1
50#endif
51
52#if PREINIT_FUNCTION_WEAK
53 weak_extern (PREINIT_FUNCTION)
54#else
55 .hidden PREINIT_FUNCTION
56#endif
57
58 .section .init,"ax",@progbits
59 .align 2
60 .globl _init
61 .hidden _init
62 .type _init, @function
63_init:
64 link.w %fp, #0
65 move.l %a5, -(%sp)
66 LOAD_GOT (%a5)
67#if PREINIT_FUNCTION_WEAK
68 tst.l PREINIT_FUNCTION@GOT(%a5)
69 jeq 1f
70 jbsr PREINIT_FUNCTION@PLTPC
711:
72#else
73 jbsr PREINIT_FUNCTION
74#endif
75
76 .section .fini,"ax",@progbits
77 .align 2
78 .globl _fini
79 .hidden _fini
80 .type _fini, @function
81_fini:
82 link.w %fp, #0
83 move.l %a5, -(%sp)
84 LOAD_GOT (%a5)
lib/libc/glibc/sysdeps/m68k/crtn.S deleted-47
......@@ -1,47 +0,0 @@
1/* Special .init and .fini section support for m68k.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crtn.S puts function epilogues in the .init and .fini sections
37 corresponding to the prologues in crti.S. */
38
39 .section .init,"ax",@progbits
40 move.l -4(%fp), %a5
41 unlk %fp
42 rts
43
44 .section .fini,"ax",@progbits
45 move.l -4(%fp), %a5
46 unlk %fp
47 rts
lib/libc/glibc/sysdeps/mips/mips32/crti.S deleted-102
......@@ -1,102 +0,0 @@
1/* Special .init and .fini section support for MIPS (o32).
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crti.S puts a function prologue at the beginning of the .init and
37 .fini sections and defines global symbols for those addresses, so
38 they can be called as functions. The symbols _init and _fini are
39 magic and cause the linker to emit DT_INIT and DT_FINI. */
40
41#include <libc-symbols.h>
42
43#ifdef __mips_micromips
44# define JALR_RELOC R_MICROMIPS_JALR
45#else
46# define JALR_RELOC R_MIPS_JALR
47#endif
48
49#ifndef PREINIT_FUNCTION
50# define PREINIT_FUNCTION __gmon_start__
51#endif
52
53#ifndef PREINIT_FUNCTION_WEAK
54# define PREINIT_FUNCTION_WEAK 1
55#endif
56
57#if PREINIT_FUNCTION_WEAK
58 weak_extern (PREINIT_FUNCTION)
59#else
60 .hidden PREINIT_FUNCTION
61#endif
62
63 .set nomips16
64
65 .section .init,"ax",@progbits
66 .p2align 2
67 .globl _init
68 .hidden _init
69 .type _init, @function
70_init:
71 .set noreorder
72 .cpload $25
73 .set reorder
74 addiu $sp,$sp,-32
75 .cprestore 16
76 sw $31,28($sp)
77#if PREINIT_FUNCTION_WEAK
78 lw $2,%got(PREINIT_FUNCTION)($28)
79 beq $2,$0,.Lno_weak_fn
80 lw $25,%call16(PREINIT_FUNCTION)($28)
81 .reloc 1f,JALR_RELOC,PREINIT_FUNCTION
821: jalr $25
83.Lno_weak_fn:
84 .insn
85#else
86 lw $25,%got(PREINIT_FUNCTION)($28)
87 .reloc 1f,JALR_RELOC,PREINIT_FUNCTION
881: jalr $25
89#endif
90
91 .section .fini,"ax",@progbits
92 .p2align 2
93 .globl _fini
94 .hidden _fini
95 .type _fini, @function
96_fini:
97 .set noreorder
98 .cpload $25
99 .set reorder
100 addiu $sp,$sp,-32
101 .cprestore 16
102 sw $31,28($sp)
lib/libc/glibc/sysdeps/mips/mips32/crtn.S deleted-59
......@@ -1,59 +0,0 @@
1/* Special .init and .fini section support for MIPS (o32).
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crtn.S puts function epilogues in the .init and .fini sections
37 corresponding to the prologues in crti.S. */
38
39 .set nomips16
40
41 .section .init,"ax",@progbits
42 lw $31,28($sp)
43 .set noreorder
44 .set nomacro
45 /* zig patch: j <reg> -> jr <reg> for https://github.com/ziglang/zig/issues/21315 */
46 jr $31
47 addiu $sp,$sp,32
48 .set macro
49 .set reorder
50
51 .section .fini,"ax",@progbits
52 lw $31,28($sp)
53 .set noreorder
54 .set nomacro
55 /* zig patch: j <reg> -> jr <reg> for https://github.com/ziglang/zig/issues/21315 */
56 jr $31
57 addiu $sp,$sp,32
58 .set macro
59 .set reorder
lib/libc/glibc/sysdeps/mips/mips64/n32/crti.S deleted-102
......@@ -1,102 +0,0 @@
1/* Special .init and .fini section support for MIPS (n32).
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crti.S puts a function prologue at the beginning of the .init and
37 .fini sections and defines global symbols for those addresses, so
38 they can be called as functions. The symbols _init and _fini are
39 magic and cause the linker to emit DT_INIT and DT_FINI. */
40
41#include <libc-symbols.h>
42
43#ifdef __mips_micromips
44# define JALR_RELOC R_MICROMIPS_JALR
45#else
46# define JALR_RELOC R_MIPS_JALR
47#endif
48
49#ifndef PREINIT_FUNCTION
50# define PREINIT_FUNCTION __gmon_start__
51#endif
52
53#ifndef PREINIT_FUNCTION_WEAK
54# define PREINIT_FUNCTION_WEAK 1
55#endif
56
57#if PREINIT_FUNCTION_WEAK
58 weak_extern (PREINIT_FUNCTION)
59#else
60 .hidden PREINIT_FUNCTION
61#endif
62
63 .set nomips16
64
65 .section .init,"ax",@progbits
66 .p2align 2
67 .globl _init
68 .hidden _init
69 .type _init, @function
70_init:
71 addiu $sp,$sp,-16
72 sd $28,0($sp)
73 lui $28,%hi(%neg(%gp_rel(_init)))
74 addu $28,$28,$25
75 sd $31,8($sp)
76 addiu $28,$28,%lo(%neg(%gp_rel(_init)))
77#if PREINIT_FUNCTION_WEAK
78 lw $2,%got_disp(PREINIT_FUNCTION)($28)
79 beq $2,$0,.Lno_weak_fn
80 lw $25,%call16(PREINIT_FUNCTION)($28)
81 .reloc 1f,JALR_RELOC,PREINIT_FUNCTION
821: jalr $25
83.Lno_weak_fn:
84 .insn
85#else
86 lw $25,%got_disp(PREINIT_FUNCTION)($28)
87 .reloc 1f,JALR_RELOC,PREINIT_FUNCTION
881: jalr $25
89#endif
90
91 .section .fini,"ax",@progbits
92 .p2align 2
93 .globl _fini
94 .hidden _fini
95 .type _fini, @function
96_fini:
97 addiu $sp,$sp,-16
98 sd $28,0($sp)
99 lui $28,%hi(%neg(%gp_rel(_fini)))
100 addu $28,$28,$25
101 sd $31,8($sp)
102 addiu $28,$28,%lo(%neg(%gp_rel(_fini)))
lib/libc/glibc/sysdeps/mips/mips64/n32/crtn.S deleted-61
......@@ -1,61 +0,0 @@
1/* Special .init and .fini section support for MIPS (n32).
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crtn.S puts function epilogues in the .init and .fini sections
37 corresponding to the prologues in crti.S. */
38
39 .set nomips16
40
41 .section .init,"ax",@progbits
42 ld $31,8($sp)
43 ld $28,0($sp)
44 .set noreorder
45 .set nomacro
46 /* zig patch: j <reg> -> jr <reg> for https://github.com/ziglang/zig/issues/21315 */
47 jr $31
48 addiu $sp,$sp,16
49 .set macro
50 .set reorder
51
52 .section .fini,"ax",@progbits
53 ld $31,8($sp)
54 ld $28,0($sp)
55 .set noreorder
56 .set nomacro
57 /* zig patch: j <reg> -> jr <reg> for https://github.com/ziglang/zig/issues/21315 */
58 jr $31
59 addiu $sp,$sp,16
60 .set macro
61 .set reorder
lib/libc/glibc/sysdeps/mips/mips64/n64/crti.S deleted-102
......@@ -1,102 +0,0 @@
1/* Special .init and .fini section support for MIPS (n64).
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crti.S puts a function prologue at the beginning of the .init and
37 .fini sections and defines global symbols for those addresses, so
38 they can be called as functions. The symbols _init and _fini are
39 magic and cause the linker to emit DT_INIT and DT_FINI. */
40
41#include <libc-symbols.h>
42
43#ifdef __mips_micromips
44# define JALR_RELOC R_MICROMIPS_JALR
45#else
46# define JALR_RELOC R_MIPS_JALR
47#endif
48
49#ifndef PREINIT_FUNCTION
50# define PREINIT_FUNCTION __gmon_start__
51#endif
52
53#ifndef PREINIT_FUNCTION_WEAK
54# define PREINIT_FUNCTION_WEAK 1
55#endif
56
57#if PREINIT_FUNCTION_WEAK
58 weak_extern (PREINIT_FUNCTION)
59#else
60 .hidden PREINIT_FUNCTION
61#endif
62
63 .set nomips16
64
65 .section .init,"ax",@progbits
66 .p2align 2
67 .globl _init
68 .hidden _init
69 .type _init, @function
70_init:
71 daddiu $sp,$sp,-16
72 sd $28,0($sp)
73 lui $28,%hi(%neg(%gp_rel(_init)))
74 daddu $28,$28,$25
75 sd $31,8($sp)
76 daddiu $28,$28,%lo(%neg(%gp_rel(_init)))
77#if PREINIT_FUNCTION_WEAK
78 ld $2,%got_disp(PREINIT_FUNCTION)($28)
79 beq $2,$0,.Lno_weak_fn
80 ld $25,%call16(PREINIT_FUNCTION)($28)
81 .reloc 1f,JALR_RELOC,PREINIT_FUNCTION
821: jalr $25
83.Lno_weak_fn:
84 .insn
85#else
86 ld $25,%got_disp(PREINIT_FUNCTION)($28)
87 .reloc 1f,JALR_RELOC,PREINIT_FUNCTION
881: jalr $25
89#endif
90
91 .section .fini,"ax",@progbits
92 .p2align 2
93 .globl _fini
94 .hidden _fini
95 .type _fini, @function
96_fini:
97 daddiu $sp,$sp,-16
98 sd $28,0($sp)
99 lui $28,%hi(%neg(%gp_rel(_fini)))
100 daddu $28,$28,$25
101 sd $31,8($sp)
102 daddiu $28,$28,%lo(%neg(%gp_rel(_fini)))
lib/libc/glibc/sysdeps/mips/mips64/n64/crtn.S deleted-61
......@@ -1,61 +0,0 @@
1/* Special .init and .fini section support for MIPS (n64).
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crtn.S puts function epilogues in the .init and .fini sections
37 corresponding to the prologues in crti.S. */
38
39 .set nomips16
40
41 .section .init,"ax",@progbits
42 ld $31,8($sp)
43 ld $28,0($sp)
44 .set noreorder
45 .set nomacro
46 /* zig patch: j <reg> -> jr <reg> for https://github.com/ziglang/zig/issues/21315 */
47 jr $31
48 daddiu $sp,$sp,16
49 .set macro
50 .set reorder
51
52 .section .fini,"ax",@progbits
53 ld $31,8($sp)
54 ld $28,0($sp)
55 .set noreorder
56 .set nomacro
57 /* zig patch: j <reg> -> jr <reg> for https://github.com/ziglang/zig/issues/21315 */
58 jr $31
59 daddiu $sp,$sp,16
60 .set macro
61 .set reorder
lib/libc/glibc/sysdeps/powerpc/powerpc32/crti.S deleted-91
......@@ -1,91 +0,0 @@
1/* Special .init and .fini section support for PowerPC.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library; if not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crti.S puts a function prologue at the beginning of the .init and
37 .fini sections and defines global symbols for those addresses, so
38 they can be called as functions. The symbols _init and _fini are
39 magic and cause the linker to emit DT_INIT and DT_FINI. */
40
41#include <libc-symbols.h>
42#include <sysdep.h>
43
44#ifndef PREINIT_FUNCTION
45# define PREINIT_FUNCTION __gmon_start__
46#endif
47
48#ifndef PREINIT_FUNCTION_WEAK
49# define PREINIT_FUNCTION_WEAK 1
50#endif
51
52#if PREINIT_FUNCTION_WEAK
53 weak_extern (PREINIT_FUNCTION)
54#else
55 .hidden PREINIT_FUNCTION
56#endif
57
58 .section .init,"ax",@progbits
59 .align 2
60 .globl _init
61 .hidden _init
62 .type _init, @function
63_init:
64 stwu r1, -16(r1)
65 mflr r0
66 stw r0, 20(r1)
67 stw r30, 8(r1)
68 SETUP_GOT_ACCESS (r30, .Lgot_label_i)
69 addis r30, r30, _GLOBAL_OFFSET_TABLE_-.Lgot_label_i@ha
70 addi r30, r30, _GLOBAL_OFFSET_TABLE_-.Lgot_label_i@l
71#if PREINIT_FUNCTION_WEAK
72 lwz r0, PREINIT_FUNCTION@got(r30)
73 cmpwi cr7, r0, 0
74 beq+ cr7, 1f
75 bl PREINIT_FUNCTION@plt
761:
77#else
78 bl PREINIT_FUNCTION@local
79#endif
80
81 .section .fini,"ax",@progbits
82 .align 2
83 .globl _fini
84 .hidden _fini
85 .type _fini, @function
86_fini:
87 stwu r1, -16(r1)
88 mflr r0
89 stw r0, 20(r1)
90 stw r30, 8(r1)
91 SETUP_GOT_ACCESS (r30, .Lgot_label_f)
lib/libc/glibc/sysdeps/powerpc/powerpc32/crtn.S deleted-53
......@@ -1,53 +0,0 @@
1/* Special .init and .fini section support for PowerPC.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library; if not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crtn.S puts function epilogues in the .init and .fini sections
37 corresponding to the prologues in crti.S. */
38
39#include <sysdep.h>
40
41 .section .init,"ax",@progbits
42 lwz r0, 20(r1)
43 mtlr r0
44 lwz r30, 8(r1)
45 addi r1, r1, 16
46 blr
47
48 .section .fini,"ax",@progbits
49 lwz r0, 20(r1)
50 mtlr r0
51 lwz r30, 8(r1)
52 addi r1, r1, 16
53 blr
lib/libc/glibc/sysdeps/powerpc/powerpc64/crti.S deleted-90
......@@ -1,90 +0,0 @@
1/* Special .init and .fini section support for PowerPC64.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library; if not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crti.S puts a function prologue at the beginning of the .init and
37 .fini sections and defines global symbols for those addresses, so
38 they can be called as functions. The symbols _init and _fini are
39 magic and cause the linker to emit DT_INIT and DT_FINI. */
40
41#include <libc-symbols.h>
42#include <sysdep.h>
43
44#ifndef PREINIT_FUNCTION
45# define PREINIT_FUNCTION __gmon_start__
46#endif
47
48#ifndef PREINIT_FUNCTION_WEAK
49# define PREINIT_FUNCTION_WEAK 1
50#endif
51
52#if PREINIT_FUNCTION_WEAK
53 weak_extern (PREINIT_FUNCTION)
54#else
55 .hidden PREINIT_FUNCTION
56#endif
57
58#if PREINIT_FUNCTION_WEAK
59 .section ".toc", "aw"
60.LC0:
61 .tc PREINIT_FUNCTION[TC], PREINIT_FUNCTION
62#endif
63 .section ".init", "ax", @progbits
64 ENTRY_2(_init)
65 .hidden _init
66 .align ALIGNARG (2)
67BODY_LABEL (_init):
68 LOCALENTRY(_init)
69 mflr 0
70 std 0, FRAME_LR_SAVE(r1)
71 stdu r1, -FRAME_MIN_SIZE_PARM(r1)
72#if PREINIT_FUNCTION_WEAK
73 addis r9, r2, .LC0@toc@ha
74 ld r0, .LC0@toc@l(r9)
75 cmpdi cr7, r0, 0
76 beq+ cr7, 1f
77#endif
78 bl JUMPTARGET (PREINIT_FUNCTION)
79 nop
801:
81
82 .section ".fini", "ax", @progbits
83 ENTRY_2(_fini)
84 .hidden _fini
85 .align ALIGNARG (2)
86BODY_LABEL (_fini):
87 LOCALENTRY(_fini)
88 mflr 0
89 std 0, FRAME_LR_SAVE(r1)
90 stdu r1, -FRAME_MIN_SIZE_PARM(r1)
lib/libc/glibc/sysdeps/powerpc/powerpc64/crtn.S deleted-51
......@@ -1,51 +0,0 @@
1/* Special .init and .fini section support for PowerPC64.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library; if not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crtn.S puts function epilogues in the .init and .fini sections
37 corresponding to the prologues in crti.S. */
38
39#include <sysdep.h>
40
41 .section .init,"ax",@progbits
42 addi r1, r1, FRAME_MIN_SIZE_PARM
43 ld r0, FRAME_LR_SAVE(r1)
44 mtlr r0
45 blr
46
47 .section .fini,"ax",@progbits
48 addi r1, r1, FRAME_MIN_SIZE_PARM
49 ld r0, FRAME_LR_SAVE(r1)
50 mtlr r0
51 blr
lib/libc/glibc/sysdeps/s390/s390-64/crti.S deleted-93
......@@ -1,93 +0,0 @@
1/* Special .init and .fini section support for 64 bit S/390.
2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library; if not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crti.S puts a function prologue at the beginning of the .init and
37 .fini sections and defines global symbols for those addresses, so
38 they can be called as functions. The symbols _init and _fini are
39 magic and cause the linker to emit DT_INIT and DT_FINI. */
40
41#include <libc-symbols.h>
42#include <sysdep.h>
43
44#ifndef PREINIT_FUNCTION
45# define PREINIT_FUNCTION __gmon_start__
46#endif
47
48#ifndef PREINIT_FUNCTION_WEAK
49# define PREINIT_FUNCTION_WEAK 1
50#endif
51
52#if PREINIT_FUNCTION_WEAK
53 weak_extern (PREINIT_FUNCTION)
54#else
55 .hidden PREINIT_FUNCTION
56#endif
57
58 .section .init,"ax",@progbits
59 .align 4
60 .globl _init
61 .hidden _init
62 .type _init,@function
63_init:
64 stmg %r6,%r15,48(%r15)
65 lgr %r1,%r15
66 aghi %r15,-160
67 stg %r1,0(%r15)
68 larl %r12,_GLOBAL_OFFSET_TABLE_
69#if PREINIT_FUNCTION_WEAK
70 /* zig patch: GOTENT -> GOT. revert with llvm 20. */
71 larl %r1,PREINIT_FUNCTION@GOT
72 lg %r1,0(%r1)
73 ltgr %r1,%r1
74 je 1f
75 basr %r14,%r1
76#else
77 brasl %r14,PREINIT_FUNCTION
78#endif
79 .align 4,0x07
801:
81
82 .section .fini,"ax",@progbits
83 .align 4
84 .globl _fini
85 .hidden _fini
86 .type _fini,@function
87_fini:
88 stmg %r6,%r15,48(%r15)
89 lg %r1,120(%r15)
90 aghi %r15,-160
91 stg %r1,0(%r15)
92 larl %r12,_GLOBAL_OFFSET_TABLE_
93 .align 4,0x07
lib/libc/glibc/sysdeps/s390/s390-64/crtn.S deleted-47
......@@ -1,47 +0,0 @@
1/* Special .init and .fini section support for 64 bit S/390.
2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library; if not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crtn.S puts function epilogues in the .init and .fini sections
37 corresponding to the prologues in crti.S. */
38
39 .section .init
40 lg %r4,272(%r15)
41 lmg %r6,%r15,208(%r15)
42 br %r4
43
44 .section .fini
45 lg %r4,272(%r15)
46 lmg %r6,%r15,208(%r15)
47 br %r4
lib/libc/glibc/sysdeps/sparc/crti.S deleted-95
......@@ -1,95 +0,0 @@
1/* Special .init and .fini section support for sparc.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library; if not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crti.S puts a function prologue at the beginning of the .init and
37 .fini sections and defines global symbols for those addresses, so
38 they can be called as functions. The symbols _init and _fini are
39 magic and cause the linker to emit DT_INIT and DT_FINI. */
40
41#include <libc-symbols.h>
42#include <sysdep.h>
43
44#ifndef PREINIT_FUNCTION
45# define PREINIT_FUNCTION __gmon_start__
46#endif
47
48#ifndef PREINIT_FUNCTION_WEAK
49# define PREINIT_FUNCTION_WEAK 1
50#endif
51
52#if PREINIT_FUNCTION_WEAK
53 weak_extern (PREINIT_FUNCTION)
54#else
55 .hidden PREINIT_FUNCTION
56#endif
57
58#ifdef __arch64__
59#define STACKFRAME_SIZE 176
60#define GOT_LOAD ldx
61#else
62#define STACKFRAME_SIZE 96
63#define GOT_LOAD ld
64#endif
65
66 .section .init,"ax",@progbits
67 .p2align 2
68 .globl _init
69 .hidden _init
70 .type _init, @function
71_init:
72 save %sp, -STACKFRAME_SIZE, %sp
73#if PREINIT_FUNCTION_WEAK
74 SETUP_PIC_REG(l7)
75 sethi %gdop_hix22(PREINIT_FUNCTION), %g1
76 xor %g1, %gdop_lox10(PREINIT_FUNCTION), %g1
77 GOT_LOAD [%l7 + %g1], %g1, %gdop(PREINIT_FUNCTION)
78 cmp %g1, 0
79 be 1f
80 nop
81 call PREINIT_FUNCTION
82 nop
831:
84#else
85 call PREINIT_FUNCTION
86 nop
87#endif
88
89 .section .fini,"ax",@progbits
90 .p2align 2
91 .globl _fini
92 .hidden _fini
93 .type _fini, @function
94_fini:
95 save %sp, -STACKFRAME_SIZE, %sp
lib/libc/glibc/sysdeps/sparc/crtn.S deleted-45
......@@ -1,45 +0,0 @@
1/* Special .init and .fini section support for sparc.
2 Copyright (C) 1995-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library; if not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crtn.S puts function epilogues in the .init and .fini sections
37 corresponding to the prologues in crti.S. */
38
39 .section .init,"ax",@progbits
40 jmp %i7 + 8
41 restore
42
43 .section .fini,"ax",@progbits
44 jmp %i7 + 8
45 restore
lib/libc/glibc/sysdeps/x86_64/crti.S deleted-84
......@@ -1,84 +0,0 @@
1/* Special .init and .fini section support for x86-64.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library; if not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crti.S puts a function prologue at the beginning of the .init and
37 .fini sections and defines global symbols for those addresses, so
38 they can be called as functions. The symbols _init and _fini are
39 magic and cause the linker to emit DT_INIT and DT_FINI. */
40
41#include <libc-symbols.h>
42#include <sysdep.h>
43
44#ifndef PREINIT_FUNCTION
45# define PREINIT_FUNCTION __gmon_start__
46#endif
47
48#ifndef PREINIT_FUNCTION_WEAK
49# define PREINIT_FUNCTION_WEAK 1
50#endif
51
52#if PREINIT_FUNCTION_WEAK
53 weak_extern (PREINIT_FUNCTION)
54#else
55 .hidden PREINIT_FUNCTION
56#endif
57
58 .section .init,"ax",@progbits
59 .p2align 2
60 .globl _init
61 .hidden _init
62 .type _init, @function
63_init:
64 _CET_ENDBR
65 /* Maintain 16-byte stack alignment for called functions. */
66 subq $8, %rsp
67#if PREINIT_FUNCTION_WEAK
68 movq PREINIT_FUNCTION@GOTPCREL(%rip), %rax
69 testq %rax, %rax
70 je .Lno_weak_fn
71 call *%rax
72.Lno_weak_fn:
73#else
74 call PREINIT_FUNCTION
75#endif
76
77 .section .fini,"ax",@progbits
78 .p2align 2
79 .globl _fini
80 .hidden _fini
81 .type _fini, @function
82_fini:
83 _CET_ENDBR
84 subq $8, %rsp
lib/libc/glibc/sysdeps/x86_64/crtn.S deleted-45
......@@ -1,45 +0,0 @@
1/* Special .init and .fini section support for x86-64.
2 Copyright (C) 2012-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
18
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
26
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library; if not, see
34 <https://www.gnu.org/licenses/>. */
35
36/* crtn.S puts function epilogues in the .init and .fini sections
37 corresponding to the prologues in crti.S. */
38
39 .section .init,"ax",@progbits
40 addq $8, %rsp
41 ret
42
43 .section .fini,"ax",@progbits
44 addq $8, %rsp
45 ret
lib/libc/musl/crt/aarch64/crti.s deleted-13
......@@ -1,13 +0,0 @@
1.section .init
2.global _init
3.type _init,%function
4_init:
5 stp x29,x30,[sp,-16]!
6 mov x29,sp
7
8.section .fini
9.global _fini
10.type _fini,%function
11_fini:
12 stp x29,x30,[sp,-16]!
13 mov x29,sp
lib/libc/musl/crt/aarch64/crtn.s deleted-7
......@@ -1,7 +0,0 @@
1.section .init
2 ldp x29,x30,[sp],#16
3 ret
4
5.section .fini
6 ldp x29,x30,[sp],#16
7 ret
lib/libc/musl/crt/arm/crti.s deleted-15
......@@ -1,15 +0,0 @@
1.syntax unified
2
3.section .init
4.global _init
5.type _init,%function
6.align 2
7_init:
8 push {r0,lr}
9
10.section .fini
11.global _fini
12.type _fini,%function
13.align 2
14_fini:
15 push {r0,lr}
lib/libc/musl/crt/arm/crtn.s deleted-9
......@@ -1,9 +0,0 @@
1.syntax unified
2
3.section .init
4 pop {r0,lr}
5 bx lr
6
7.section .fini
8 pop {r0,lr}
9 bx lr
lib/libc/musl/crt/crti.c deleted
lib/libc/musl/crt/crtn.c deleted
lib/libc/musl/crt/i386/crti.s deleted-9
......@@ -1,9 +0,0 @@
1.section .init
2.global _init
3_init:
4 sub $12,%esp
5
6.section .fini
7.global _fini
8_fini:
9 sub $12,%esp
lib/libc/musl/crt/i386/crtn.s deleted-7
......@@ -1,7 +0,0 @@
1.section .init
2 add $12,%esp
3 ret
4
5.section .fini
6 add $12,%esp
7 ret
lib/libc/musl/crt/microblaze/crti.s deleted-13
......@@ -1,13 +0,0 @@
1.section .init
2.global _init
3.align 2
4_init:
5 addi r1, r1, -32
6 swi r15, r1, 0
7
8.section .fini
9.global _fini
10.align 2
11_fini:
12 addi r1, r1, -32
13 swi r15, r1, 0
lib/libc/musl/crt/microblaze/crtn.s deleted-9
......@@ -1,9 +0,0 @@
1.section .init
2 lwi r15, r1, 0
3 rtsd r15, 8
4 addi r1, r1, 32
5
6.section .fini
7 lwi r15, r1, 0
8 rtsd r15, 8
9 addi r1, r1, 32
lib/libc/musl/crt/mips/crti.s deleted-19
......@@ -1,19 +0,0 @@
1.set noreorder
2
3.section .init
4.global _init
5.type _init,@function
6.align 2
7_init:
8 subu $sp,$sp,32
9 sw $gp,24($sp)
10 sw $ra,28($sp)
11
12.section .fini
13.global _fini
14.type _fini,@function
15.align 2
16_fini:
17 subu $sp,$sp,32
18 sw $gp,24($sp)
19 sw $ra,28($sp)
lib/libc/musl/crt/mips/crtn.s deleted-15
......@@ -1,15 +0,0 @@
1.set noreorder
2
3.section .init
4 lw $gp,24($sp)
5 lw $ra,28($sp)
6 # zig patch: j <reg> -> jr <reg> for https://github.com/ziglang/zig/issues/21315
7 jr $ra
8 addu $sp,$sp,32
9
10.section .fini
11 lw $gp,24($sp)
12 lw $ra,28($sp)
13 # zig patch: j <reg> -> jr <reg> for https://github.com/ziglang/zig/issues/21315
14 jr $ra
15 addu $sp,$sp,32
lib/libc/musl/crt/mips64/crti.s deleted-17
......@@ -1,17 +0,0 @@
1.set noreorder
2
3.section .init
4.global _init
5.align 3
6_init:
7 dsubu $sp, $sp, 32
8 sd $gp, 16($sp)
9 sd $ra, 24($sp)
10
11.section .fini
12.global _fini
13.align 3
14_fini:
15 dsubu $sp, $sp, 32
16 sd $gp, 16($sp)
17 sd $ra, 24($sp)
lib/libc/musl/crt/mips64/crtn.s deleted-15
......@@ -1,15 +0,0 @@
1.set noreorder
2
3.section .init
4 ld $gp,16($sp)
5 ld $ra,24($sp)
6 # zig patch: j <reg> -> jr <reg> for https://github.com/ziglang/zig/issues/21315
7 jr $ra
8 daddu $sp,$sp,32
9
10.section .fini
11 ld $gp,16($sp)
12 ld $ra,24($sp)
13 # zig patch: j <reg> -> jr <reg> for https://github.com/ziglang/zig/issues/21315
14 jr $ra
15 daddu $sp,$sp,32
lib/libc/musl/crt/mipsn32/crti.s deleted-18
......@@ -1,18 +0,0 @@
1.set noreorder
2.section .init
3.global _init
4.type _init,@function
5.align 2
6_init:
7 subu $sp, $sp, 32
8 sd $gp, 16($sp)
9 sd $ra, 24($sp)
10
11.section .fini
12.global _fini
13.type _fini,@function
14.align 2
15_fini:
16 subu $sp, $sp, 32
17 sd $gp, 16($sp)
18 sd $ra, 24($sp)
lib/libc/musl/crt/mipsn32/crtn.s deleted-14
......@@ -1,14 +0,0 @@
1.set noreorder
2.section .init
3 ld $gp, 16($sp)
4 ld $ra, 24($sp)
5 # zig patch: j <reg> -> jr <reg> for https://github.com/ziglang/zig/issues/21315
6 jr $ra
7 addu $sp, $sp, 32
8
9.section .fini
10 ld $gp, 16($sp)
11 ld $ra, 24($sp)
12 # zig patch: j <reg> -> jr <reg> for https://github.com/ziglang/zig/issues/21315
13 jr $ra
14 addu $sp, $sp, 32
lib/libc/musl/crt/or1k/crti.s deleted-11
......@@ -1,11 +0,0 @@
1.section .init
2.global _init
3_init:
4 l.addi r1,r1,-4
5 l.sw 0(r1),r9
6
7.section .fini
8.global _fini
9_fini:
10 l.addi r1,r1,-4
11 l.sw 0(r1),r9
lib/libc/musl/crt/or1k/crtn.s deleted-9
......@@ -1,9 +0,0 @@
1.section .init
2 l.lwz r9,0(r1)
3 l.jr r9
4 l.addi r1,r1,4
5
6.section .fini
7 l.lwz r9,0(r1)
8 l.jr r9
9 l.addi r1,r1,4
lib/libc/musl/crt/powerpc/crti.s deleted-15
......@@ -1,15 +0,0 @@
1.section .init
2.align 2
3.global _init
4_init:
5 stwu 1,-32(1)
6 mflr 0
7 stw 0,36(1)
8
9.section .fini
10.align 2
11.global _fini
12_fini:
13 stwu 1,-32(1)
14 mflr 0
15 stw 0,36(1)
lib/libc/musl/crt/powerpc/crtn.s deleted-13
......@@ -1,13 +0,0 @@
1.section .init
2.align 2
3 lwz 0,36(1)
4 addi 1,1,32
5 mtlr 0
6 blr
7
8.section .fini
9.align 2
10 lwz 0,36(1)
11 addi 1,1,32
12 mtlr 0
13 blr
lib/libc/musl/crt/powerpc64/crti.s deleted-21
......@@ -1,21 +0,0 @@
1.section .init
2.align 2
3.global _init
4_init:
5 addis 2, 12, .TOC.-_init@ha
6 addi 2, 2, .TOC.-_init@l
7 .localentry _init,.-_init
8 mflr 0
9 std 0, 16(1)
10 stdu 1,-32(1)
11
12.section .fini
13.align 2
14.global _fini
15_fini:
16 addis 2, 12, .TOC.-_fini@ha
17 addi 2, 2, .TOC.-_fini@l
18 .localentry _fini,.-_fini
19 mflr 0
20 std 0, 16(1)
21 stdu 1,-32(1)
lib/libc/musl/crt/powerpc64/crtn.s deleted-13
......@@ -1,13 +0,0 @@
1.section .init
2.align 2
3 addi 1, 1, 32
4 ld 0, 16(1)
5 mtlr 0
6 blr
7
8.section .fini
9.align 2
10 addi 1, 1, 32
11 ld 0, 16(1)
12 mtlr 0
13 blr
lib/libc/musl/crt/s390x/crti.s deleted-17
......@@ -1,17 +0,0 @@
1.section .init
2.align 2
3.global _init
4_init:
5 stmg %r14, %r15, 112(%r15)
6 lgr %r0, %r15
7 aghi %r15, -160
8 stg %r0, 0(%r15)
9
10.section .fini
11.align 2
12.global _fini
13_fini:
14 stmg %r14, %r15, 112(%r15)
15 lgr %r0, %r15
16 aghi %r15, -160
17 stg %r0, 0(%r15)
lib/libc/musl/crt/s390x/crtn.s deleted-9
......@@ -1,9 +0,0 @@
1.section .init
2.align 2
3 lmg %r14, %r15, 272(%r15)
4 br %r14
5
6.section .fini
7.align 2
8 lmg %r14, %r15, 272(%r15)
9 br %r14
lib/libc/musl/crt/sh/crti.s deleted-21
......@@ -1,21 +0,0 @@
1.section .init
2.global _init
3.type _init, @function
4_init:
5 add #-4, r15
6 mov.l r12, @-r15
7 mov.l r14, @-r15
8 sts.l pr, @-r15
9 mov r15, r14
10 nop
11
12.section .fini
13.global _fini
14.type _fini, @function
15_fini:
16 add #-4, r15
17 mov.l r12, @-r15
18 mov.l r14, @-r15
19 sts.l pr, @-r15
20 mov r15, r14
21 nop
lib/libc/musl/crt/sh/crtn.s deleted-13
......@@ -1,13 +0,0 @@
1.section .init
2 lds.l @r15+, pr
3 mov.l @r15+, r14
4 mov.l @r15+, r12
5 rts
6 add #4, r15
7
8.section .fini
9 lds.l @r15+, pr
10 mov.l @r15+, r14
11 mov.l @r15+, r12
12 rts
13 add #4, r15
lib/libc/musl/crt/x32/crti.s deleted-9
......@@ -1,9 +0,0 @@
1.section .init
2.global _init
3_init:
4 push %rax
5
6.section .fini
7.global _fini
8_fini:
9 push %rax
lib/libc/musl/crt/x32/crtn.s deleted-7
......@@ -1,7 +0,0 @@
1.section .init
2 pop %rax
3 ret
4
5.section .fini
6 pop %rax
7 ret
lib/libc/musl/crt/x86_64/crti.s deleted-9
......@@ -1,9 +0,0 @@
1.section .init
2.global _init
3_init:
4 push %rax
5
6.section .fini
7.global _fini
8_fini:
9 push %rax
lib/libc/musl/crt/x86_64/crtn.s deleted-7
......@@ -1,7 +0,0 @@
1.section .init
2 pop %rax
3 ret
4
5.section .fini
6 pop %rax
7 ret
src/Compilation.zig+213-227
......@@ -122,6 +122,10 @@ link_task_queue_postponed: std.ArrayListUnmanaged(link.Task) = .empty,
122122/// the linker task thread.
123123remaining_prelink_tasks: u32,
124124
125/// Set of work that can be represented by only flags to determine whether the
126/// work is queued or not.
127queued_jobs: QueuedJobs,
128
125129work_queues: [
126130 len: {
127131 var len: usize = 0;
......@@ -193,10 +197,6 @@ stack_report: bool,
193197debug_compiler_runtime_libs: bool,
194198debug_compile_errors: bool,
195199incremental: bool,
196job_queued_compiler_rt_lib: bool = false,
197job_queued_compiler_rt_obj: bool = false,
198job_queued_fuzzer_lib: bool = false,
199job_queued_update_builtin_zig: bool,
200200alloc_failure_occurred: bool = false,
201201last_update_was_cache_hit: bool = false,
202202
......@@ -234,13 +234,13 @@ tsan_lib: ?CrtFile = null,
234234/// and resolved before calling linker.flush().
235235libc_static_lib: ?CrtFile = null,
236236/// Populated when we build the libcompiler_rt static library. A Job to build this is indicated
237/// by setting `job_queued_compiler_rt_lib` and resolved before calling linker.flush().
237/// by setting `queued_jobs.compiler_rt_lib` and resolved before calling linker.flush().
238238compiler_rt_lib: ?CrtFile = null,
239239/// Populated when we build the compiler_rt_obj object. A Job to build this is indicated
240/// by setting `job_queued_compiler_rt_obj` and resolved before calling linker.flush().
240/// by setting `queued_jobs.compiler_rt_obj` and resolved before calling linker.flush().
241241compiler_rt_obj: ?CrtFile = null,
242242/// Populated when we build the libfuzzer static library. A Job to build this
243/// is indicated by setting `job_queued_fuzzer_lib` and resolved before
243/// is indicated by setting `queued_jobs.fuzzer_lib` and resolved before
244244/// calling linker.flush().
245245fuzzer_lib: ?CrtFile = null,
246246
......@@ -284,6 +284,27 @@ file_system_inputs: ?*std.ArrayListUnmanaged(u8),
284284/// This digest will be known after update() is called.
285285digest: ?[Cache.bin_digest_len]u8 = null,
286286
287const QueuedJobs = struct {
288 compiler_rt_lib: bool = false,
289 compiler_rt_obj: bool = false,
290 fuzzer_lib: bool = false,
291 update_builtin_zig: bool,
292 musl_crt_file: [@typeInfo(musl.CrtFile).@"enum".fields.len]bool = @splat(false),
293 glibc_crt_file: [@typeInfo(glibc.CrtFile).@"enum".fields.len]bool = @splat(false),
294 /// one of WASI libc static objects
295 wasi_libc_crt_file: [@typeInfo(wasi_libc.CrtFile).@"enum".fields.len]bool = @splat(false),
296 /// one of the mingw-w64 static objects
297 mingw_crt_file: [@typeInfo(mingw.CrtFile).@"enum".fields.len]bool = @splat(false),
298 /// all of the glibc shared objects
299 glibc_shared_objects: bool = false,
300 /// libunwind.a, usually needed when linking libc
301 libunwind: bool = false,
302 libcxx: bool = false,
303 libcxxabi: bool = false,
304 libtsan: bool = false,
305 zig_libc: bool = false,
306};
307
287308pub const default_stack_protector_buffer_size = target_util.default_stack_protector_buffer_size;
288309pub const SemaError = Zcu.SemaError;
289310
......@@ -377,26 +398,6 @@ const Job = union(enum) {
377398 /// Fully resolve the given `struct` or `union` type.
378399 resolve_type_fully: InternPool.Index,
379400
380 /// one of the glibc static objects
381 glibc_crt_file: glibc.CrtFile,
382 /// all of the glibc shared objects
383 glibc_shared_objects,
384 /// one of the musl static objects
385 musl_crt_file: musl.CrtFile,
386 /// one of the mingw-w64 static objects
387 mingw_crt_file: mingw.CrtFile,
388
389 /// libunwind.a, usually needed when linking libc
390 libunwind: void,
391 libcxx: void,
392 libcxxabi: void,
393 libtsan: void,
394 /// needed when not linking libc and using LLVM for code generation because it generates
395 /// calls to, for example, memcpy and memset.
396 zig_libc: void,
397 /// one of WASI libc static objects
398 wasi_libc_crt_file: wasi_libc.CrtFile,
399
400401 /// The value is the index into `windows_libs`.
401402 windows_import_lib: usize,
402403
......@@ -800,8 +801,6 @@ pub const MiscTask = enum {
800801 docs_copy,
801802 docs_wasm,
802803
803 @"musl crti.o",
804 @"musl crtn.o",
805804 @"musl crt1.o",
806805 @"musl rcrt1.o",
807806 @"musl Scrt1.o",
......@@ -816,8 +815,6 @@ pub const MiscTask = enum {
816815 @"libwasi-emulated-mman.a",
817816 @"libwasi-emulated-signal.a",
818817
819 @"glibc crti.o",
820 @"glibc crtn.o",
821818 @"glibc Scrt1.o",
822819 @"glibc libc_nonshared.a",
823820 @"glibc shared object",
......@@ -1512,7 +1509,9 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
15121509 .framework_dirs = options.framework_dirs,
15131510 .llvm_opt_bisect_limit = options.llvm_opt_bisect_limit,
15141511 .skip_linker_dependencies = options.skip_linker_dependencies,
1515 .job_queued_update_builtin_zig = have_zcu,
1512 .queued_jobs = .{
1513 .update_builtin_zig = have_zcu,
1514 },
15161515 .function_sections = options.function_sections,
15171516 .data_sections = options.data_sections,
15181517 .native_system_include_paths = options.native_system_include_paths,
......@@ -1804,64 +1803,44 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
18041803 } else if (target.isMusl() and !target.isWasm()) {
18051804 if (!std.zig.target.canBuildLibC(target)) return error.LibCUnavailable;
18061805
1807 if (musl.needsCrtiCrtn(target)) {
1808 try comp.queueJobs(&[_]Job{
1809 .{ .musl_crt_file = .crti_o },
1810 .{ .musl_crt_file = .crtn_o },
1811 });
1812 comp.remaining_prelink_tasks += 2;
1813 }
18141806 if (musl.needsCrt0(comp.config.output_mode, comp.config.link_mode, comp.config.pie)) |f| {
1815 try comp.queueJobs(&.{.{ .musl_crt_file = f }});
1807 comp.queued_jobs.musl_crt_file[@intFromEnum(f)] = true;
18161808 comp.remaining_prelink_tasks += 1;
18171809 }
1818 try comp.queueJobs(&.{.{ .musl_crt_file = switch (comp.config.link_mode) {
1819 .static => .libc_a,
1820 .dynamic => .libc_so,
1821 } }});
1810 switch (comp.config.link_mode) {
1811 .static => comp.queued_jobs.musl_crt_file[@intFromEnum(musl.CrtFile.libc_a)] = true,
1812 .dynamic => comp.queued_jobs.musl_crt_file[@intFromEnum(musl.CrtFile.libc_so)] = true,
1813 }
18221814 comp.remaining_prelink_tasks += 1;
18231815 } else if (target.isGnuLibC()) {
18241816 if (!std.zig.target.canBuildLibC(target)) return error.LibCUnavailable;
18251817
1826 if (glibc.needsCrtiCrtn(target)) {
1827 try comp.queueJobs(&[_]Job{
1828 .{ .glibc_crt_file = .crti_o },
1829 .{ .glibc_crt_file = .crtn_o },
1830 });
1831 comp.remaining_prelink_tasks += 2;
1832 }
18331818 if (glibc.needsCrt0(comp.config.output_mode)) |f| {
1834 try comp.queueJobs(&.{.{ .glibc_crt_file = f }});
1819 comp.queued_jobs.glibc_crt_file[@intFromEnum(f)] = true;
18351820 comp.remaining_prelink_tasks += 1;
18361821 }
1837 try comp.queueJobs(&[_]Job{
1838 .{ .glibc_shared_objects = {} },
1839 .{ .glibc_crt_file = .libc_nonshared_a },
1840 });
1841 comp.remaining_prelink_tasks += 1;
1822 comp.queued_jobs.glibc_shared_objects = true;
18421823 comp.remaining_prelink_tasks += glibc.sharedObjectsCount(&target);
1824
1825 comp.queued_jobs.glibc_crt_file[@intFromEnum(glibc.CrtFile.libc_nonshared_a)] = true;
1826 comp.remaining_prelink_tasks += 1;
18431827 } else if (target.isWasm() and target.os.tag == .wasi) {
18441828 if (!std.zig.target.canBuildLibC(target)) return error.LibCUnavailable;
18451829
18461830 for (comp.wasi_emulated_libs) |crt_file| {
1847 try comp.queueJob(.{
1848 .wasi_libc_crt_file = crt_file,
1849 });
1850 comp.remaining_prelink_tasks += 1;
1831 comp.queued_jobs.wasi_libc_crt_file[@intFromEnum(crt_file)] = true;
18511832 }
1852 try comp.queueJobs(&[_]Job{
1853 .{ .wasi_libc_crt_file = wasi_libc.execModelCrtFile(comp.config.wasi_exec_model) },
1854 .{ .wasi_libc_crt_file = .libc_a },
1855 });
1833 comp.remaining_prelink_tasks += @intCast(comp.wasi_emulated_libs.len);
1834
1835 comp.queued_jobs.wasi_libc_crt_file[@intFromEnum(wasi_libc.execModelCrtFile(comp.config.wasi_exec_model))] = true;
1836 comp.queued_jobs.wasi_libc_crt_file[@intFromEnum(wasi_libc.CrtFile.libc_a)] = true;
18561837 comp.remaining_prelink_tasks += 2;
18571838 } else if (target.isMinGW()) {
18581839 if (!std.zig.target.canBuildLibC(target)) return error.LibCUnavailable;
18591840
1860 const crt_job: Job = .{ .mingw_crt_file = if (is_dyn_lib) .dllcrt2_o else .crt2_o };
1861 try comp.queueJobs(&.{
1862 .{ .mingw_crt_file = .mingw32_lib },
1863 crt_job,
1864 });
1841 const main_crt_file: mingw.CrtFile = if (is_dyn_lib) .dllcrt2_o else .crt2_o;
1842 comp.queued_jobs.mingw_crt_file[@intFromEnum(main_crt_file)] = true;
1843 comp.queued_jobs.mingw_crt_file[@intFromEnum(mingw.CrtFile.mingw32_lib)] = true;
18651844 comp.remaining_prelink_tasks += 2;
18661845
18671846 // When linking mingw-w64 there are some import libs we always need.
......@@ -1873,7 +1852,7 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
18731852 else => return error.LibCUnavailable,
18741853 }
18751854 } else if (target.os.tag == .freestanding and capable_of_building_zig_libc) {
1876 try comp.queueJob(.{ .zig_libc = {} });
1855 comp.queued_jobs.zig_libc = true;
18771856 comp.remaining_prelink_tasks += 1;
18781857 } else {
18791858 return error.LibCUnavailable;
......@@ -1886,18 +1865,22 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
18861865 for (0..count) |i| {
18871866 try comp.queueJob(.{ .windows_import_lib = i });
18881867 }
1868 // when integrating coff linker with prelink, the above
1869 // queueJob will need to change into something else since those
1870 // jobs are dispatched *after* the link_task_wait_group.wait()
1871 // that happens when separateCodegenThreadOk() is false.
18891872 }
18901873 if (comp.wantBuildLibUnwindFromSource()) {
1891 try comp.queueJob(.{ .libunwind = {} });
1874 comp.queued_jobs.libunwind = true;
18921875 comp.remaining_prelink_tasks += 1;
18931876 }
18941877 if (build_options.have_llvm and is_exe_or_dyn_lib and comp.config.link_libcpp) {
1895 try comp.queueJob(.libcxx);
1896 try comp.queueJob(.libcxxabi);
1878 comp.queued_jobs.libcxx = true;
1879 comp.queued_jobs.libcxxabi = true;
18971880 comp.remaining_prelink_tasks += 2;
18981881 }
18991882 if (build_options.have_llvm and is_exe_or_dyn_lib and comp.config.any_sanitize_thread) {
1900 try comp.queueJob(.libtsan);
1883 comp.queued_jobs.libtsan = true;
19011884 comp.remaining_prelink_tasks += 1;
19021885 }
19031886
......@@ -1916,20 +1899,20 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
19161899 if (comp.include_compiler_rt and capable_of_building_compiler_rt) {
19171900 if (is_exe_or_dyn_lib) {
19181901 log.debug("queuing a job to build compiler_rt_lib", .{});
1919 comp.job_queued_compiler_rt_lib = true;
1902 comp.queued_jobs.compiler_rt_lib = true;
19201903 comp.remaining_prelink_tasks += 1;
19211904 } else if (output_mode != .Obj) {
19221905 log.debug("queuing a job to build compiler_rt_obj", .{});
19231906 // In this case we are making a static library, so we ask
19241907 // for a compiler-rt object to put in it.
1925 comp.job_queued_compiler_rt_obj = true;
1908 comp.queued_jobs.compiler_rt_obj = true;
19261909 comp.remaining_prelink_tasks += 1;
19271910 }
19281911 }
19291912
19301913 if (is_exe_or_dyn_lib and comp.config.any_fuzz and capable_of_building_compiler_rt) {
19311914 log.debug("queuing a job to build libfuzzer", .{});
1932 comp.job_queued_fuzzer_lib = true;
1915 comp.queued_jobs.fuzzer_lib = true;
19331916 comp.remaining_prelink_tasks += 1;
19341917 }
19351918 }
......@@ -3712,21 +3695,70 @@ fn performAllTheWorkInner(
37123695 work_queue_wait_group.spawnManager(workerDocsWasm, .{ comp, main_progress_node });
37133696 }
37143697
3715 if (comp.job_queued_compiler_rt_lib) {
3716 comp.job_queued_compiler_rt_lib = false;
3698 if (testAndClear(&comp.queued_jobs.compiler_rt_lib)) {
37173699 comp.link_task_wait_group.spawnManager(buildRt, .{ comp, "compiler_rt.zig", .compiler_rt, .Lib, &comp.compiler_rt_lib, main_progress_node });
37183700 }
37193701
3720 if (comp.job_queued_compiler_rt_obj) {
3721 comp.job_queued_compiler_rt_obj = false;
3702 if (testAndClear(&comp.queued_jobs.compiler_rt_obj)) {
37223703 comp.link_task_wait_group.spawnManager(buildRt, .{ comp, "compiler_rt.zig", .compiler_rt, .Obj, &comp.compiler_rt_obj, main_progress_node });
37233704 }
37243705
3725 if (comp.job_queued_fuzzer_lib) {
3726 comp.job_queued_fuzzer_lib = false;
3706 if (testAndClear(&comp.queued_jobs.fuzzer_lib)) {
37273707 comp.link_task_wait_group.spawnManager(buildRt, .{ comp, "fuzzer.zig", .libfuzzer, .Lib, &comp.fuzzer_lib, main_progress_node });
37283708 }
37293709
3710 if (testAndClear(&comp.queued_jobs.glibc_shared_objects)) {
3711 comp.link_task_wait_group.spawnManager(buildGlibcSharedObjects, .{ comp, main_progress_node });
3712 }
3713
3714 if (testAndClear(&comp.queued_jobs.libunwind)) {
3715 comp.link_task_wait_group.spawnManager(buildLibUnwind, .{ comp, main_progress_node });
3716 }
3717
3718 if (testAndClear(&comp.queued_jobs.libcxx)) {
3719 comp.link_task_wait_group.spawnManager(buildLibCxx, .{ comp, main_progress_node });
3720 }
3721
3722 if (testAndClear(&comp.queued_jobs.libcxxabi)) {
3723 comp.link_task_wait_group.spawnManager(buildLibCxxAbi, .{ comp, main_progress_node });
3724 }
3725
3726 if (testAndClear(&comp.queued_jobs.libtsan)) {
3727 comp.link_task_wait_group.spawnManager(buildLibTsan, .{ comp, main_progress_node });
3728 }
3729
3730 if (testAndClear(&comp.queued_jobs.zig_libc)) {
3731 comp.link_task_wait_group.spawnManager(buildZigLibc, .{ comp, main_progress_node });
3732 }
3733
3734 for (0..@typeInfo(musl.CrtFile).@"enum".fields.len) |i| {
3735 if (testAndClear(&comp.queued_jobs.musl_crt_file[i])) {
3736 const tag: musl.CrtFile = @enumFromInt(i);
3737 comp.link_task_wait_group.spawnManager(buildMuslCrtFile, .{ comp, tag, main_progress_node });
3738 }
3739 }
3740
3741 for (0..@typeInfo(glibc.CrtFile).@"enum".fields.len) |i| {
3742 if (testAndClear(&comp.queued_jobs.glibc_crt_file[i])) {
3743 const tag: glibc.CrtFile = @enumFromInt(i);
3744 comp.link_task_wait_group.spawnManager(buildGlibcCrtFile, .{ comp, tag, main_progress_node });
3745 }
3746 }
3747
3748 for (0..@typeInfo(wasi_libc.CrtFile).@"enum".fields.len) |i| {
3749 if (testAndClear(&comp.queued_jobs.wasi_libc_crt_file[i])) {
3750 const tag: wasi_libc.CrtFile = @enumFromInt(i);
3751 comp.link_task_wait_group.spawnManager(buildWasiLibcCrtFile, .{ comp, tag, main_progress_node });
3752 }
3753 }
3754
3755 for (0..@typeInfo(mingw.CrtFile).@"enum".fields.len) |i| {
3756 if (testAndClear(&comp.queued_jobs.mingw_crt_file[i])) {
3757 const tag: mingw.CrtFile = @enumFromInt(i);
3758 comp.link_task_wait_group.spawnManager(buildMingwCrtFile, .{ comp, tag, main_progress_node });
3759 }
3760 }
3761
37303762 {
37313763 const astgen_frame = tracy.namedFrame("astgen");
37323764 defer astgen_frame.end();
......@@ -3741,8 +3773,8 @@ fn performAllTheWorkInner(
37413773 // 1. to avoid race condition of zig processes truncating each other's builtin.zig files
37423774 // 2. optimization; in the hot path it only incurs a stat() syscall, which happens
37433775 // in the `astgen_wait_group`.
3744 if (comp.job_queued_update_builtin_zig) b: {
3745 comp.job_queued_update_builtin_zig = false;
3776 if (comp.queued_jobs.update_builtin_zig) b: {
3777 comp.queued_jobs.update_builtin_zig = false;
37463778 if (comp.zcu == null) break :b;
37473779 // TODO put all the modules in a flat array to make them easy to iterate.
37483780 var seen: std.AutoArrayHashMapUnmanaged(*Package.Module, void) = .empty;
......@@ -3821,11 +3853,12 @@ fn performAllTheWorkInner(
38213853 comp.link_task_wait_group.wait();
38223854 comp.link_task_wait_group.reset();
38233855 std.log.scoped(.link).debug("finished waiting for link_task_wait_group", .{});
3856 assert(comp.remaining_prelink_tasks == 0);
38243857 }
38253858
38263859 work: while (true) {
38273860 for (&comp.work_queues) |*work_queue| if (work_queue.readItem()) |job| {
3828 try processOneJob(@intFromEnum(Zcu.PerThread.Id.main), comp, job, main_progress_node);
3861 try processOneJob(@intFromEnum(Zcu.PerThread.Id.main), comp, job);
38293862 continue :work;
38303863 };
38313864 if (comp.zcu) |zcu| {
......@@ -3860,7 +3893,7 @@ pub fn queueJobs(comp: *Compilation, jobs: []const Job) !void {
38603893 for (jobs) |job| try comp.queueJob(job);
38613894}
38623895
3863fn processOneJob(tid: usize, comp: *Compilation, job: Job, prog_node: std.Progress.Node) JobError!void {
3896fn processOneJob(tid: usize, comp: *Compilation, job: Job) JobError!void {
38643897 switch (job) {
38653898 .codegen_nav => |nav_index| {
38663899 const zcu = comp.zcu.?;
......@@ -3956,56 +3989,6 @@ fn processOneJob(tid: usize, comp: *Compilation, job: Job, prog_node: std.Progre
39563989 error.AnalysisFail => return,
39573990 };
39583991 },
3959 .glibc_crt_file => |crt_file| {
3960 const named_frame = tracy.namedFrame("glibc_crt_file");
3961 defer named_frame.end();
3962
3963 glibc.buildCrtFile(comp, crt_file, prog_node) catch |err| {
3964 // TODO Surface more error details.
3965 comp.lockAndSetMiscFailure(.glibc_crt_file, "unable to build glibc CRT file: {s}", .{
3966 @errorName(err),
3967 });
3968 };
3969 },
3970 .glibc_shared_objects => {
3971 const named_frame = tracy.namedFrame("glibc_shared_objects");
3972 defer named_frame.end();
3973
3974 glibc.buildSharedObjects(comp, prog_node) catch |err| {
3975 // TODO Surface more error details.
3976 comp.lockAndSetMiscFailure(
3977 .glibc_shared_objects,
3978 "unable to build glibc shared objects: {s}",
3979 .{@errorName(err)},
3980 );
3981 };
3982 },
3983 .musl_crt_file => |crt_file| {
3984 const named_frame = tracy.namedFrame("musl_crt_file");
3985 defer named_frame.end();
3986
3987 musl.buildCrtFile(comp, crt_file, prog_node) catch |err| {
3988 // TODO Surface more error details.
3989 comp.lockAndSetMiscFailure(
3990 .musl_crt_file,
3991 "unable to build musl CRT file: {s}",
3992 .{@errorName(err)},
3993 );
3994 };
3995 },
3996 .mingw_crt_file => |crt_file| {
3997 const named_frame = tracy.namedFrame("mingw_crt_file");
3998 defer named_frame.end();
3999
4000 mingw.buildCrtFile(comp, crt_file, prog_node) catch |err| {
4001 // TODO Surface more error details.
4002 comp.lockAndSetMiscFailure(
4003 .mingw_crt_file,
4004 "unable to build mingw-w64 CRT file {s}: {s}",
4005 .{ @tagName(crt_file), @errorName(err) },
4006 );
4007 };
4008 },
40093992 .windows_import_lib => |index| {
40103993 const named_frame = tracy.namedFrame("windows_import_lib");
40113994 defer named_frame.end();
......@@ -4020,95 +4003,6 @@ fn processOneJob(tid: usize, comp: *Compilation, job: Job, prog_node: std.Progre
40204003 );
40214004 };
40224005 },
4023 .libunwind => {
4024 const named_frame = tracy.namedFrame("libunwind");
4025 defer named_frame.end();
4026
4027 libunwind.buildStaticLib(comp, prog_node) catch |err| switch (err) {
4028 error.OutOfMemory => return error.OutOfMemory,
4029 error.SubCompilationFailed => return, // error reported already
4030 else => comp.lockAndSetMiscFailure(
4031 .libunwind,
4032 "unable to build libunwind: {s}",
4033 .{@errorName(err)},
4034 ),
4035 };
4036 },
4037 .libcxx => {
4038 const named_frame = tracy.namedFrame("libcxx");
4039 defer named_frame.end();
4040
4041 libcxx.buildLibCXX(comp, prog_node) catch |err| switch (err) {
4042 error.OutOfMemory => return error.OutOfMemory,
4043 error.SubCompilationFailed => return, // error reported already
4044 else => comp.lockAndSetMiscFailure(
4045 .libcxx,
4046 "unable to build libcxx: {s}",
4047 .{@errorName(err)},
4048 ),
4049 };
4050 },
4051 .libcxxabi => {
4052 const named_frame = tracy.namedFrame("libcxxabi");
4053 defer named_frame.end();
4054
4055 libcxx.buildLibCXXABI(comp, prog_node) catch |err| switch (err) {
4056 error.OutOfMemory => return error.OutOfMemory,
4057 error.SubCompilationFailed => return, // error reported already
4058 else => comp.lockAndSetMiscFailure(
4059 .libcxxabi,
4060 "unable to build libcxxabi: {s}",
4061 .{@errorName(err)},
4062 ),
4063 };
4064 },
4065 .libtsan => {
4066 const named_frame = tracy.namedFrame("libtsan");
4067 defer named_frame.end();
4068
4069 libtsan.buildTsan(comp, prog_node) catch |err| switch (err) {
4070 error.OutOfMemory => return error.OutOfMemory,
4071 error.SubCompilationFailed => return, // error reported already
4072 else => comp.lockAndSetMiscFailure(
4073 .libtsan,
4074 "unable to build TSAN library: {s}",
4075 .{@errorName(err)},
4076 ),
4077 };
4078 },
4079 .wasi_libc_crt_file => |crt_file| {
4080 const named_frame = tracy.namedFrame("wasi_libc_crt_file");
4081 defer named_frame.end();
4082
4083 wasi_libc.buildCrtFile(comp, crt_file, prog_node) catch |err| {
4084 // TODO Surface more error details.
4085 comp.lockAndSetMiscFailure(
4086 .wasi_libc_crt_file,
4087 "unable to build WASI libc CRT file: {s}",
4088 .{@errorName(err)},
4089 );
4090 };
4091 },
4092 .zig_libc => {
4093 const named_frame = tracy.namedFrame("zig_libc");
4094 defer named_frame.end();
4095
4096 comp.buildOutputFromZig(
4097 "c.zig",
4098 .Lib,
4099 &comp.libc_static_lib,
4100 .zig_libc,
4101 prog_node,
4102 ) catch |err| switch (err) {
4103 error.OutOfMemory => return error.OutOfMemory,
4104 error.SubCompilationFailed => return, // error reported already
4105 else => comp.lockAndSetMiscFailure(
4106 .zig_libc,
4107 "unable to build zig's multitarget libc: {s}",
4108 .{@errorName(err)},
4109 ),
4110 };
4111 },
41124006 }
41134007}
41144008
......@@ -4761,6 +4655,92 @@ fn buildRt(
47614655 };
47624656}
47634657
4658fn buildMuslCrtFile(comp: *Compilation, crt_file: musl.CrtFile, prog_node: std.Progress.Node) void {
4659 musl.buildCrtFile(comp, crt_file, prog_node) catch |err| switch (err) {
4660 error.SubCompilationFailed => return, // error reported already
4661 else => comp.lockAndSetMiscFailure(.musl_crt_file, "unable to build musl {s}: {s}", .{
4662 @tagName(crt_file), @errorName(err),
4663 }),
4664 };
4665}
4666
4667fn buildGlibcCrtFile(comp: *Compilation, crt_file: glibc.CrtFile, prog_node: std.Progress.Node) void {
4668 glibc.buildCrtFile(comp, crt_file, prog_node) catch |err| switch (err) {
4669 error.SubCompilationFailed => return, // error reported already
4670 else => comp.lockAndSetMiscFailure(.glibc_crt_file, "unable to build glibc {s}: {s}", .{
4671 @tagName(crt_file), @errorName(err),
4672 }),
4673 };
4674}
4675
4676fn buildGlibcSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) void {
4677 glibc.buildSharedObjects(comp, prog_node) catch |err| switch (err) {
4678 error.SubCompilationFailed => return, // error reported already
4679 else => comp.lockAndSetMiscFailure(.glibc_shared_objects, "unable to build glibc shared objects: {s}", .{
4680 @errorName(err),
4681 }),
4682 };
4683}
4684
4685fn buildMingwCrtFile(comp: *Compilation, crt_file: mingw.CrtFile, prog_node: std.Progress.Node) void {
4686 mingw.buildCrtFile(comp, crt_file, prog_node) catch |err| switch (err) {
4687 error.SubCompilationFailed => return, // error reported already
4688 else => comp.lockAndSetMiscFailure(.mingw_crt_file, "unable to build mingw-w64 {s}: {s}", .{
4689 @tagName(crt_file), @errorName(err),
4690 }),
4691 };
4692}
4693
4694fn buildWasiLibcCrtFile(comp: *Compilation, crt_file: wasi_libc.CrtFile, prog_node: std.Progress.Node) void {
4695 wasi_libc.buildCrtFile(comp, crt_file, prog_node) catch |err| switch (err) {
4696 error.SubCompilationFailed => return, // error reported already
4697 else => comp.lockAndSetMiscFailure(.wasi_libc_crt_file, "unable to build WASI libc {s}: {s}", .{
4698 @tagName(crt_file), @errorName(err),
4699 }),
4700 };
4701}
4702
4703fn buildLibUnwind(comp: *Compilation, prog_node: std.Progress.Node) void {
4704 libunwind.buildStaticLib(comp, prog_node) catch |err| switch (err) {
4705 error.SubCompilationFailed => return, // error reported already
4706 else => comp.lockAndSetMiscFailure(.libunwind, "unable to build libunwind: {s}", .{@errorName(err)}),
4707 };
4708}
4709
4710fn buildLibCxx(comp: *Compilation, prog_node: std.Progress.Node) void {
4711 libcxx.buildLibCxx(comp, prog_node) catch |err| switch (err) {
4712 error.SubCompilationFailed => return, // error reported already
4713 else => comp.lockAndSetMiscFailure(.libcxx, "unable to build libcxx: {s}", .{@errorName(err)}),
4714 };
4715}
4716
4717fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) void {
4718 libcxx.buildLibCxxAbi(comp, prog_node) catch |err| switch (err) {
4719 error.SubCompilationFailed => return, // error reported already
4720 else => comp.lockAndSetMiscFailure(.libcxxabi, "unable to build libcxxabi: {s}", .{@errorName(err)}),
4721 };
4722}
4723
4724fn buildLibTsan(comp: *Compilation, prog_node: std.Progress.Node) void {
4725 libtsan.buildTsan(comp, prog_node) catch |err| switch (err) {
4726 error.SubCompilationFailed => return, // error reported already
4727 else => comp.lockAndSetMiscFailure(.libtsan, "unable to build TSAN library: {s}", .{@errorName(err)}),
4728 };
4729}
4730
4731fn buildZigLibc(comp: *Compilation, prog_node: std.Progress.Node) void {
4732 comp.buildOutputFromZig(
4733 "c.zig",
4734 .Lib,
4735 &comp.libc_static_lib,
4736 .zig_libc,
4737 prog_node,
4738 ) catch |err| switch (err) {
4739 error.SubCompilationFailed => return, // error reported already
4740 else => comp.lockAndSetMiscFailure(.zig_libc, "unable to build zig's multitarget libc: {s}", .{@errorName(err)}),
4741 };
4742}
4743
47644744fn reportRetryableCObjectError(
47654745 comp: *Compilation,
47664746 c_object: *CObject,
......@@ -6805,3 +6785,9 @@ pub fn compilerRtOptMode(comp: Compilation) std.builtin.OptimizeMode {
68056785pub fn compilerRtStrip(comp: Compilation) bool {
68066786 return comp.root_mod.strip;
68076787}
6788
6789fn testAndClear(b: *bool) bool {
6790 const result = b.*;
6791 b.* = false;
6792 return result;
6793}
src/glibc.zig+11-97
......@@ -156,29 +156,14 @@ pub fn loadMetaData(gpa: Allocator, contents: []const u8) LoadMetaDataError!*ABI
156156 return abi;
157157}
158158
159fn useElfInitFini(target: std.Target) bool {
160 // Legacy architectures use _init/_fini.
161 return switch (target.cpu.arch) {
162 .arm, .armeb => true,
163 .aarch64, .aarch64_be => true,
164 .m68k => true,
165 .mips, .mipsel, .mips64, .mips64el => true,
166 .powerpc, .powerpcle, .powerpc64, .powerpc64le => true,
167 .s390x => true,
168 .sparc, .sparc64 => true,
169 .x86, .x86_64 => true,
170 else => false,
171 };
172}
173
174159pub const CrtFile = enum {
175 crti_o,
176 crtn_o,
177160 scrt1_o,
178161 libc_nonshared_a,
179162};
180163
181pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progress.Node) !void {
164/// TODO replace anyerror with explicit error set, recording user-friendly errors with
165/// setMiscFailure and returning error.SubCompilationFailed. see libcxx.zig for example.
166pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progress.Node) anyerror!void {
182167 if (!build_options.have_llvm) {
183168 return error.ZigCompilerNotBuiltWithLLVMExtensions;
184169 }
......@@ -199,51 +184,6 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre
199184 // waste computation and create false negatives.
200185
201186 switch (crt_file) {
202 .crti_o => {
203 var args = std.ArrayList([]const u8).init(arena);
204 try add_include_dirs(comp, arena, &args);
205 try args.appendSlice(&[_][]const u8{
206 "-D_LIBC_REENTRANT",
207 "-include",
208 try lib_path(comp, arena, lib_libc_glibc ++ "include" ++ path.sep_str ++ "libc-modules.h"),
209 "-DMODULE_NAME=libc",
210 "-Wno-nonportable-include-path",
211 "-include",
212 try lib_path(comp, arena, lib_libc_glibc ++ "include" ++ path.sep_str ++ "libc-symbols.h"),
213 "-DTOP_NAMESPACE=glibc",
214 "-DASSEMBLER",
215 "-Wa,--noexecstack",
216 });
217 var files = [_]Compilation.CSourceFile{
218 .{
219 .src_path = try start_asm_path(comp, arena, "crti.S"),
220 .cache_exempt_flags = args.items,
221 .owner = comp.root_mod,
222 },
223 };
224 return comp.build_crt_file("crti", .Obj, .@"glibc crti.o", prog_node, &files, .{});
225 },
226 .crtn_o => {
227 var args = std.ArrayList([]const u8).init(arena);
228 try add_include_dirs(comp, arena, &args);
229 try args.appendSlice(&[_][]const u8{
230 "-D_LIBC_REENTRANT",
231 "-DMODULE_NAME=libc",
232 "-include",
233 try lib_path(comp, arena, lib_libc_glibc ++ "include" ++ path.sep_str ++ "libc-symbols.h"),
234 "-DTOP_NAMESPACE=glibc",
235 "-DASSEMBLER",
236 "-Wa,--noexecstack",
237 });
238 var files = [_]Compilation.CSourceFile{
239 .{
240 .src_path = try start_asm_path(comp, arena, "crtn.S"),
241 .cache_exempt_flags = args.items,
242 .owner = undefined,
243 },
244 };
245 return comp.build_crt_file("crtn", .Obj, .@"glibc crtn.o", prog_node, &files, .{});
246 },
247187 .scrt1_o => {
248188 const start_o: Compilation.CSourceFile = blk: {
249189 var args = std.ArrayList([]const u8).init(arena);
......@@ -381,9 +321,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre
381321 });
382322 try add_include_dirs(comp, arena, &args);
383323
384 if (!useElfInitFini(target)) {
385 try args.append("-DNO_INITFINI");
386 }
324 try args.append("-DNO_INITFINI");
387325
388326 if (target.cpu.arch == .x86) {
389327 // This prevents i386/sysdep.h from trying to do some
......@@ -430,32 +368,15 @@ fn start_asm_path(comp: *Compilation, arena: Allocator, basename: []const u8) ![
430368 try result.appendSlice(comp.zig_lib_directory.path.?);
431369 try result.appendSlice(s ++ "libc" ++ s ++ "glibc" ++ s ++ "sysdeps" ++ s);
432370 if (is_sparc) {
433 if (mem.eql(u8, basename, "crti.S") or mem.eql(u8, basename, "crtn.S")) {
434 try result.appendSlice("sparc");
371 if (is_64) {
372 try result.appendSlice("sparc" ++ s ++ "sparc64");
435373 } else {
436 if (is_64) {
437 try result.appendSlice("sparc" ++ s ++ "sparc64");
438 } else {
439 try result.appendSlice("sparc" ++ s ++ "sparc32");
440 }
374 try result.appendSlice("sparc" ++ s ++ "sparc32");
441375 }
442376 } else if (arch.isArm()) {
443377 try result.appendSlice("arm");
444378 } else if (arch.isMIPS()) {
445 if (!mem.eql(u8, basename, "crti.S") and !mem.eql(u8, basename, "crtn.S")) {
446 try result.appendSlice("mips");
447 } else {
448 if (is_64) {
449 const abi_dir = if (comp.getTarget().abi == .gnuabin32)
450 "n32"
451 else
452 "n64";
453 try result.appendSlice("mips" ++ s ++ "mips64" ++ s);
454 try result.appendSlice(abi_dir);
455 } else {
456 try result.appendSlice("mips" ++ s ++ "mips32");
457 }
458 }
379 try result.appendSlice("mips");
459380 } else if (arch == .x86_64) {
460381 try result.appendSlice("x86_64");
461382 } else if (arch == .x86) {
......@@ -735,7 +656,9 @@ fn wordDirective(target: std.Target) []const u8 {
735656 return if (target.ptrBitWidth() == 64) ".quad" else ".long";
736657}
737658
738pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !void {
659/// TODO replace anyerror with explicit error set, recording user-friendly errors with
660/// setMiscFailure and returning error.SubCompilationFailed. see libcxx.zig for example.
661pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anyerror!void {
739662 const tracy = trace(@src());
740663 defer tracy.end();
741664
......@@ -1362,15 +1285,6 @@ fn buildSharedLib(
13621285 try comp.updateSubCompilation(sub_compilation, .@"glibc shared object", prog_node);
13631286}
13641287
1365// Return true if glibc has crti/crtn sources for that architecture.
1366pub fn needsCrtiCrtn(target: std.Target) bool {
1367 return switch (target.cpu.arch) {
1368 .riscv32, .riscv64 => false,
1369 .loongarch64 => false,
1370 else => true,
1371 };
1372}
1373
13741288pub fn needsCrt0(output_mode: std.builtin.OutputMode) ?CrtFile {
13751289 return switch (output_mode) {
13761290 .Obj, .Lib => null,
src/libcxx.zig+2-2
......@@ -114,7 +114,7 @@ pub const BuildError = error{
114114 ZigCompilerNotBuiltWithLLVMExtensions,
115115};
116116
117pub fn buildLibCXX(comp: *Compilation, prog_node: std.Progress.Node) BuildError!void {
117pub fn buildLibCxx(comp: *Compilation, prog_node: std.Progress.Node) BuildError!void {
118118 if (!build_options.have_llvm) {
119119 return error.ZigCompilerNotBuiltWithLLVMExtensions;
120120 }
......@@ -357,7 +357,7 @@ pub fn buildLibCXX(comp: *Compilation, prog_node: std.Progress.Node) BuildError!
357357 comp.queueLinkTaskMode(crt_file.full_object_path, output_mode);
358358}
359359
360pub fn buildLibCXXABI(comp: *Compilation, prog_node: std.Progress.Node) BuildError!void {
360pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildError!void {
361361 if (!build_options.have_llvm) {
362362 return error.ZigCompilerNotBuiltWithLLVMExtensions;
363363 }
src/mingw.zig+3-1
......@@ -17,7 +17,9 @@ pub const CrtFile = enum {
1717 mingw32_lib,
1818};
1919
20pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progress.Node) !void {
20/// TODO replace anyerror with explicit error set, recording user-friendly errors with
21/// setMiscFailure and returning error.SubCompilationFailed. see libcxx.zig for example.
22pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progress.Node) anyerror!void {
2123 if (!build_options.have_llvm) {
2224 return error.ZigCompilerNotBuiltWithLLVMExtensions;
2325 }
src/musl.zig+3-52
......@@ -9,8 +9,6 @@ const Compilation = @import("Compilation.zig");
99const build_options = @import("build_options");
1010
1111pub const CrtFile = enum {
12 crti_o,
13 crtn_o,
1412 crt1_o,
1513 rcrt1_o,
1614 scrt1_o,
......@@ -18,7 +16,9 @@ pub const CrtFile = enum {
1816 libc_so,
1917};
2018
21pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Progress.Node) !void {
19/// TODO replace anyerror with explicit error set, recording user-friendly errors with
20/// setMiscFailure and returning error.SubCompilationFailed. see libcxx.zig for example.
21pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Progress.Node) anyerror!void {
2222 if (!build_options.have_llvm) {
2323 return error.ZigCompilerNotBuiltWithLLVMExtensions;
2424 }
......@@ -28,40 +28,6 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro
2828 const arena = arena_allocator.allocator();
2929
3030 switch (in_crt_file) {
31 .crti_o => {
32 var args = std.ArrayList([]const u8).init(arena);
33 try addCcArgs(comp, arena, &args, false);
34 var files = [_]Compilation.CSourceFile{
35 .{
36 .src_path = try start_asm_path(comp, arena, "crti.s"),
37 .extra_flags = args.items,
38 .owner = undefined,
39 },
40 };
41 return comp.build_crt_file("crti", .Obj, .@"musl crti.o", prog_node, &files, .{
42 .function_sections = true,
43 .data_sections = true,
44 .omit_frame_pointer = true,
45 .no_builtin = true,
46 });
47 },
48 .crtn_o => {
49 var args = std.ArrayList([]const u8).init(arena);
50 try addCcArgs(comp, arena, &args, false);
51 var files = [_]Compilation.CSourceFile{
52 .{
53 .src_path = try start_asm_path(comp, arena, "crtn.s"),
54 .extra_flags = args.items,
55 .owner = undefined,
56 },
57 };
58 return comp.build_crt_file("crtn", .Obj, .@"musl crtn.o", prog_node, &files, .{
59 .function_sections = true,
60 .data_sections = true,
61 .omit_frame_pointer = true,
62 .no_builtin = true,
63 });
64 },
6531 .crt1_o => {
6632 var args = std.ArrayList([]const u8).init(arena);
6733 try addCcArgs(comp, arena, &args, false);
......@@ -327,21 +293,6 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro
327293 }
328294}
329295
330/// Return true if musl has arch-specific crti/crtn sources.
331/// See lib/libc/musl/crt/ARCH/crt?.s .
332pub fn needsCrtiCrtn(target: std.Target) bool {
333 return switch (target.cpu.arch) {
334 .loongarch64,
335 .m68k,
336 .riscv32,
337 .riscv64,
338 .wasm32,
339 .wasm64,
340 => false,
341 else => true,
342 };
343}
344
345296pub fn needsCrt0(output_mode: std.builtin.OutputMode, link_mode: std.builtin.LinkMode, pie: bool) ?CrtFile {
346297 return switch (output_mode) {
347298 .Obj, .Lib => null,
src/wasi_libc.zig+3-1
......@@ -57,7 +57,9 @@ pub fn execModelCrtFileFullName(wasi_exec_model: std.builtin.WasiExecModel) []co
5757 };
5858}
5959
60pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progress.Node) !void {
60/// TODO replace anyerror with explicit error set, recording user-friendly errors with
61/// setMiscFailure and returning error.SubCompilationFailed. see libcxx.zig for example.
62pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progress.Node) anyerror!void {
6163 if (!build_options.have_llvm) {
6264 return error.ZigCompilerNotBuiltWithLLVMExtensions;
6365 }
test/link/elf.zig-4
......@@ -1,7 +1,3 @@
1//! Here we test our ELF linker for correctness and functionality.
2//! Currently, we support linking x86_64 Linux, but in the future we
3//! will progressively relax those to exercise more combinations.
4
51pub fn testAll(b: *Build, build_opts: BuildOptions) *Step {
62 _ = build_opts;
73 const elf_step = b.step("test-elf", "Run ELF tests");