@zigc/lib 0.15.2-test.1 → 0.15.2-test.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +1 -5
  3. package/libc/freebsd/lib/csu/aarch64/crt.h +1 -0
  4. package/libc/freebsd/lib/csu/aarch64/crt1_c.c +33 -0
  5. package/libc/freebsd/lib/csu/aarch64/crt1_s.S +68 -0
  6. package/libc/freebsd/lib/csu/amd64/crt.h +30 -0
  7. package/libc/freebsd/lib/csu/amd64/crt1_c.c +30 -0
  8. package/libc/freebsd/lib/csu/amd64/crt1_s.S +89 -0
  9. package/libc/freebsd/lib/csu/arm/crt.h +1 -0
  10. package/libc/freebsd/lib/csu/arm/crt1_c.c +80 -0
  11. package/libc/freebsd/lib/csu/arm/crt1_s.S +77 -0
  12. package/libc/freebsd/lib/csu/common/crtbegin.c +95 -0
  13. package/libc/freebsd/lib/csu/common/crtbrand.S +55 -0
  14. package/libc/freebsd/lib/csu/common/crtend.c +65 -0
  15. package/libc/freebsd/lib/csu/common/csu_common.h +50 -0
  16. package/libc/freebsd/lib/csu/common/feature_note.S +47 -0
  17. package/libc/freebsd/lib/csu/common/ignore_init_note.S +48 -0
  18. package/libc/freebsd/lib/csu/common/notes.h +32 -0
  19. package/libc/freebsd/lib/csu/i386/crt.h +30 -0
  20. package/libc/freebsd/lib/csu/i386/crt1_c.c +30 -0
  21. package/libc/freebsd/lib/csu/i386/crt1_s.S +91 -0
  22. package/libc/freebsd/lib/csu/powerpc/crt.h +31 -0
  23. package/libc/freebsd/lib/csu/powerpc/crt1_c.c +89 -0
  24. package/libc/freebsd/lib/csu/powerpc/crtsavres.S +189 -0
  25. package/libc/freebsd/lib/csu/powerpc64/crt.h +31 -0
  26. package/libc/freebsd/lib/csu/powerpc64/crt1_c.c +83 -0
  27. package/libc/freebsd/lib/csu/riscv/crt.h +8 -0
  28. package/libc/freebsd/lib/csu/riscv/crt1_c.c +51 -0
  29. package/libc/freebsd/lib/csu/riscv/crt1_s.S +51 -0
  30. package/libc/freebsd/lib/libc/include/libc_private.h +450 -0
  31. package/libc/netbsd/lib/csu/arch/aarch64/crt0.S +45 -0
  32. package/libc/netbsd/lib/csu/arch/earm/crt0.S +61 -0
  33. package/libc/netbsd/lib/csu/arch/i386/crt0.S +48 -0
  34. package/libc/netbsd/lib/csu/arch/m68k/crt0.S +47 -0
  35. package/libc/netbsd/lib/csu/arch/mips/crt0.S +59 -0
  36. package/libc/netbsd/lib/csu/arch/powerpc/crt0.S +56 -0
  37. package/libc/netbsd/lib/csu/arch/sparc/crt0.S +55 -0
  38. package/libc/netbsd/lib/csu/arch/sparc64/crt0.S +59 -0
  39. package/libc/netbsd/lib/csu/arch/x86_64/crt0.S +48 -0
  40. package/libc/netbsd/lib/csu/common/crt0-common.c +351 -0
  41. package/libc/netbsd/lib/csu/common/crtbegin.c +135 -0
  42. package/libc/netbsd/lib/csu/common/csu-common.h +38 -0
  43. package/libc/netbsd/lib/csu/common/sysident.S +89 -0
  44. package/libc/netbsd/lib/csu/common/sysident_assym.h +17 -0
  45. package/package.json +2 -2
@@ -0,0 +1,61 @@
1
+ /* $NetBSD: crt0.S,v 1.4 2018/11/26 17:37:44 joerg Exp $ */
2
+
3
+ /*-
4
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
5
+ * All rights reserved.
6
+ *
7
+ * This code is derived from software contributed to The NetBSD Foundation
8
+ * by Matt Thomas of 3am Software Foundry.
9
+ *
10
+ * Redistribution and use in source and binary forms, with or without
11
+ * modification, are permitted provided that the following conditions
12
+ * are met:
13
+ * 1. Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ * 2. Redistributions in binary form must reproduce the above copyright
16
+ * notice, this list of conditions and the following disclaimer in the
17
+ * documentation and/or other materials provided with the distribution.
18
+ *
19
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ * POSSIBILITY OF SUCH DAMAGE.
30
+ */
31
+
32
+ #include <arm/asm.h>
33
+
34
+ RCSID("$NetBSD: crt0.S,v 1.4 2018/11/26 17:37:44 joerg Exp $")
35
+
36
+ STRONG_ALIAS(_start,__start)
37
+
38
+ _ENTRY(__start)
39
+ /*
40
+ * ps_strings is passed in r0 and cleanup in r2.
41
+ * It should be ps_string in r1 and cleanup in r0.
42
+ */
43
+ mov r1, r0
44
+ mov r0, r2
45
+
46
+ /* Ensure the stack is properly aligned before calling C code. */
47
+ #if !defined(__thumb__)
48
+ bic sp, sp, #7
49
+ #else
50
+ movs r6, #7
51
+ mov r7, sp
52
+ bics r7, r7, r6
53
+ mov sp, r7
54
+ #endif
55
+
56
+ /*
57
+ * void ___start(void (*cleanup)(void),
58
+ * struct ps_strings *ps_strings);
59
+ */
60
+
61
+ b ___start
@@ -0,0 +1,48 @@
1
+ /* $NetBSD: crt0.S,v 1.4 2018/11/26 17:37:45 joerg Exp $ */
2
+
3
+ /*
4
+ * Copyright (c) 1998 Christos Zoulas
5
+ * Copyright (c) 1995 Christopher G. Demetriou
6
+ * All rights reserved.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without
9
+ * modification, are permitted provided that the following conditions
10
+ * are met:
11
+ * 1. Redistributions of source code must retain the above copyright
12
+ * notice, this list of conditions and the following disclaimer.
13
+ * 2. Redistributions in binary form must reproduce the above copyright
14
+ * notice, this list of conditions and the following disclaimer in the
15
+ * documentation and/or other materials provided with the distribution.
16
+ * 3. All advertising materials mentioning features or use of this software
17
+ * must display the following acknowledgement:
18
+ * This product includes software developed for the
19
+ * NetBSD Project. See http://www.NetBSD.org/ for
20
+ * information about NetBSD.
21
+ * 4. The name of the author may not be used to endorse or promote products
22
+ * derived from this software without specific prior written permission.
23
+ *
24
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ *
35
+ * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
36
+ */
37
+
38
+ #include <machine/asm.h>
39
+
40
+ RCSID("$NetBSD: crt0.S,v 1.4 2018/11/26 17:37:45 joerg Exp $")
41
+
42
+ .hidden ___start
43
+
44
+ STRONG_ALIAS(_start,__start)
45
+ _ENTRY(__start)
46
+ pushl %ebx
47
+ pushl %edx
48
+ call ___start
@@ -0,0 +1,47 @@
1
+ #include <machine/asm.h>
2
+
3
+ /*
4
+ * Copyright (c) 1999 Klaus Klein
5
+ * Copyright (c) 1995 Christopher G. Demetriou
6
+ * All rights reserved.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without
9
+ * modification, are permitted provided that the following conditions
10
+ * are met:
11
+ * 1. Redistributions of source code must retain the above copyright
12
+ * notice, this list of conditions and the following disclaimer.
13
+ * 2. Redistributions in binary form must reproduce the above copyright
14
+ * notice, this list of conditions and the following disclaimer in the
15
+ * documentation and/or other materials provided with the distribution.
16
+ * 3. All advertising materials mentioning features or use of this software
17
+ * must display the following acknowledgement:
18
+ * This product includes software developed for the
19
+ * NetBSD Project. See http://www.NetBSD.org/ for
20
+ * information about NetBSD.
21
+ * 4. The name of the author may not be used to endorse or promote products
22
+ * derived from this software without specific prior written permission.
23
+ *
24
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ *
35
+ * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
36
+ */
37
+
38
+ RCSID("$NetBSD: crt0.S,v 1.5 2018/11/26 17:37:45 joerg Exp $")
39
+
40
+ STRONG_ALIAS(_start,__start)
41
+
42
+ _ENTRY(__start)
43
+ movl %a2,-(%sp) | ps_strings
44
+ movl %a1,-(%sp) | cleanup
45
+ | call: ___start(cleanup, ps_strings)
46
+ jbsr ___start
47
+ END(__start)
@@ -0,0 +1,59 @@
1
+ /* $NetBSD: crt0.S,v 1.4 2018/11/26 17:37:45 joerg Exp $ */
2
+
3
+ /*-
4
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
5
+ * All rights reserved.
6
+ *
7
+ * This code is derived from software contributed to The NetBSD Foundation
8
+ * by Matt Thomas of 3am Software Foundry.
9
+ *
10
+ * Redistribution and use in source and binary forms, with or without
11
+ * modification, are permitted provided that the following conditions
12
+ * are met:
13
+ * 1. Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ * 2. Redistributions in binary form must reproduce the above copyright
16
+ * notice, this list of conditions and the following disclaimer in the
17
+ * documentation and/or other materials provided with the distribution.
18
+ *
19
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ * POSSIBILITY OF SUCH DAMAGE.
30
+ */
31
+
32
+ #include <mips/asm.h>
33
+
34
+ RCSID("$NetBSD: crt0.S,v 1.4 2018/11/26 17:37:45 joerg Exp $")
35
+
36
+ STRONG_ALIAS(_start,__start)
37
+
38
+ /*
39
+ * Assumes kernel (or ld_elf.so) passes the following parameters to
40
+ * user-space in registers:
41
+ *
42
+ * a0 stack pointer (0 if setregs didn't fill this in)
43
+ * a1 cleanup
44
+ * a2 Obj_Entry
45
+ * a3 ps_strings
46
+ *
47
+ * XXX Does this violate the ABI?
48
+ * as well as the usual registers (pc, sp, and t9 == pc for ABI).
49
+ */
50
+
51
+ NESTED_NOPROFILE(__start, CALLFRAME_SIZ, ra)
52
+ SETUP_GP
53
+ SETUP_GP64(t3, __start)
54
+ move a0, a1 /* cleanup */
55
+ PTR_L t9,%call16(_C_LABEL(___start))(gp)
56
+ move a1, a3 /* ps_strings */
57
+ .reloc 1f,R_MIPS_JALR,___start
58
+ 1: jr t9
59
+ END(__start)
@@ -0,0 +1,56 @@
1
+ /*-
2
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This code is derived from software contributed to The NetBSD Foundation
6
+ * by Matt Thomas of 3am Software Foundry.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without
9
+ * modification, are permitted provided that the following conditions
10
+ * are met:
11
+ * 1. Redistributions of source code must retain the above copyright
12
+ * notice, this list of conditions and the following disclaimer.
13
+ * 2. Redistributions in binary form must reproduce the above copyright
14
+ * notice, this list of conditions and the following disclaimer in the
15
+ * documentation and/or other materials provided with the distribution.
16
+ *
17
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
18
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
+ * POSSIBILITY OF SUCH DAMAGE.
28
+ */
29
+
30
+ #include <powerpc/asm.h>
31
+
32
+ RCSID("$NetBSD: crt0.S,v 1.7 2018/11/26 17:37:45 joerg Exp $")
33
+
34
+ STRONG_ALIAS(_start,__start)
35
+
36
+ .hidden ___start
37
+
38
+ #ifndef _LP64
39
+ .weak _SDA_BASE_
40
+ #endif
41
+
42
+ ENTRY_NOPROFILE(__start)
43
+ #ifndef _LP64
44
+ bcl 20,31,1f
45
+ 1:
46
+ mflr %r11
47
+ /* SVR4 ABI says small data is in r13 */
48
+ addis %r13,%r11,_SDA_BASE_-1b@ha
49
+ addi %r13,%r13,_SDA_BASE_-1b@l
50
+ #endif
51
+
52
+ mr %r3,%r7 /* cleanup */
53
+ mr %r4,%r8 /* ps_strings */
54
+
55
+ CALL(___start)
56
+ END(__start)
@@ -0,0 +1,55 @@
1
+ /* $NetBSD: crt0.S,v 1.3 2018/11/26 17:37:45 joerg Exp $ */
2
+
3
+ /*
4
+ * Copyright (c) 1998 Christos Zoulas
5
+ * Copyright (c) 1995 Christopher G. Demetriou
6
+ * All rights reserved.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without
9
+ * modification, are permitted provided that the following conditions
10
+ * are met:
11
+ * 1. Redistributions of source code must retain the above copyright
12
+ * notice, this list of conditions and the following disclaimer.
13
+ * 2. Redistributions in binary form must reproduce the above copyright
14
+ * notice, this list of conditions and the following disclaimer in the
15
+ * documentation and/or other materials provided with the distribution.
16
+ * 3. All advertising materials mentioning features or use of this software
17
+ * must display the following acknowledgement:
18
+ * This product includes software developed for the
19
+ * NetBSD Project. See http://www.NetBSD.org/ for
20
+ * information about NetBSD.
21
+ * 4. The name of the author may not be used to endorse or promote products
22
+ * derived from this software without specific prior written permission.
23
+ *
24
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ *
35
+ * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
36
+ */
37
+
38
+ #include <machine/asm.h>
39
+
40
+ RCSID("$NetBSD: crt0.S,v 1.3 2018/11/26 17:37:45 joerg Exp $")
41
+
42
+ STRONG_ALIAS(_start,__start)
43
+
44
+ ! called with:
45
+ ! %g3 = cleanup
46
+ ! %g1 = ps_strings
47
+ ! call: ___start(cleanup, ps_strings)
48
+ _ENTRY(__start)
49
+ mov 0, %fp
50
+ andn %sp, 7, %sp ! align stack
51
+ sub %sp, 24, %sp ! expand to standard stack frame size
52
+ mov %g3, %o0
53
+ call ___start
54
+ mov %g1, %o1
55
+
@@ -0,0 +1,59 @@
1
+ /* $NetBSD: crt0.S,v 1.2 2018/11/26 17:37:46 joerg Exp $ */
2
+
3
+ /*
4
+ * Copyright (c) 1998 Christos Zoulas
5
+ * Copyright (c) 1995 Christopher G. Demetriou
6
+ * All rights reserved.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without
9
+ * modification, are permitted provided that the following conditions
10
+ * are met:
11
+ * 1. Redistributions of source code must retain the above copyright
12
+ * notice, this list of conditions and the following disclaimer.
13
+ * 2. Redistributions in binary form must reproduce the above copyright
14
+ * notice, this list of conditions and the following disclaimer in the
15
+ * documentation and/or other materials provided with the distribution.
16
+ * 3. All advertising materials mentioning features or use of this software
17
+ * must display the following acknowledgement:
18
+ * This product includes software developed for the
19
+ * NetBSD Project. See http://www.NetBSD.org/ for
20
+ * information about NetBSD.
21
+ * 4. The name of the author may not be used to endorse or promote products
22
+ * derived from this software without specific prior written permission.
23
+ *
24
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ *
35
+ * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
36
+ */
37
+
38
+ #include <machine/asm.h>
39
+
40
+ RCSID("$NetBSD: crt0.S,v 1.2 2018/11/26 17:37:46 joerg Exp $")
41
+
42
+ STRONG_ALIAS(_start,__start)
43
+
44
+ .align 4
45
+ .register %g3,#scratch
46
+ .register %g2,#scratch
47
+
48
+ ! called with:
49
+ ! %g3 = cleanup
50
+ ! %g2 = obj
51
+ ! %g1 = ps_strings
52
+ ! call: ___start(cleanup, ps_strings)
53
+ _ENTRY(__start)
54
+ clr %fp
55
+ clr %g4 ! data base for some memory models
56
+ mov %g3, %o0
57
+ ba,pt %icc,___start
58
+ mov %g1, %o1
59
+
@@ -0,0 +1,48 @@
1
+ /* $NetBSD: crt0.S,v 1.4 2018/11/26 17:37:46 joerg Exp $ */
2
+
3
+ /*
4
+ * Copyright (c) 1998 Christos Zoulas
5
+ * Copyright (c) 1995 Christopher G. Demetriou
6
+ * All rights reserved.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without
9
+ * modification, are permitted provided that the following conditions
10
+ * are met:
11
+ * 1. Redistributions of source code must retain the above copyright
12
+ * notice, this list of conditions and the following disclaimer.
13
+ * 2. Redistributions in binary form must reproduce the above copyright
14
+ * notice, this list of conditions and the following disclaimer in the
15
+ * documentation and/or other materials provided with the distribution.
16
+ * 3. All advertising materials mentioning features or use of this software
17
+ * must display the following acknowledgement:
18
+ * This product includes software developed for the
19
+ * NetBSD Project. See http://www.NetBSD.org/ for
20
+ * information about NetBSD.
21
+ * 4. The name of the author may not be used to endorse or promote products
22
+ * derived from this software without specific prior written permission.
23
+ *
24
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ */
35
+
36
+ #include <machine/asm.h>
37
+
38
+ RCSID("$NetBSD: crt0.S,v 1.4 2018/11/26 17:37:46 joerg Exp $")
39
+
40
+ STRONG_ALIAS(_start,__start)
41
+ .hidden ___start
42
+
43
+ _ENTRY(__start)
44
+ andq $~15,%rsp
45
+ subq $8,%rsp
46
+ movq %rdx, %rdi
47
+ movq %rbx, %rsi
48
+ jmp ___start