-/* $OpenBSD: md_init.h,v 1.11 2023/03/31 18:46:24 kettenis Exp $ */
+/* $OpenBSD: md_init.h,v 1.12 2023/11/18 16:26:16 deraadt Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
" \n" \
" b ___start \n" \
" \n" \
- "_dl_exit: \n" \
- " mov x8, #" STR(SYS_exit) " \n" \
- " svc #0 \n" \
- " dsb nsh \n" \
- " isb \n" \
+ "_csu_abort: \n" \
" udf #0 \n" \
".previous");
-/* $OpenBSD: md_init.h,v 1.12 2020/10/15 16:30:23 deraadt Exp $ */
+/* $OpenBSD: md_init.h,v 1.13 2023/11/18 16:26:16 deraadt Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
* All rights reserved.
" mov $9, $16 \n" \
" mov 0, $17 \n" \
" jsr $26, ___start \n" \
- ".globl _dl_exit \n" \
- ".type _dl_exit@function \n" \
- "_dl_exit: \n" \
- " lda $0, " STR(SYS_exit) " \n" \
- " callsys \n" \
+ ".globl _csu_abort \n" \
+ ".type _csu_abort@function \n" \
+ "_csu_abort: \n" \
" halt ")
#define MD_START_ARGS char **sp, void (*cleanup)(void)
-/* $OpenBSD: md_init.h,v 1.10 2023/04/25 04:10:21 deraadt Exp $ */
+/* $OpenBSD: md_init.h,v 1.11 2023/11/18 16:26:16 deraadt Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
" addq $8,%rsp \n" \
" jmp ___start \n" \
" \n" \
- " .global _dl_exit \n" \
- " .type _dl_exit,@function \n" \
+ " .global _csu_abort \n" \
+ " .type _csu_abort,@function \n" \
" .align 8 \n" \
- "_dl_exit: \n" \
+ "_csu_abort: \n" \
" endbr64 \n" \
- " movl $ " STR(SYS_exit) ", %eax \n" \
- " syscall \n" \
" int3 \n" \
" .previous")
-/* $OpenBSD: md_init.h,v 1.17 2020/10/19 17:57:40 naddy Exp $ */
+/* $OpenBSD: md_init.h,v 1.18 2023/11/18 16:26:16 deraadt Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
".L__DYNAMIC: \n" \
" .long _DYNAMIC(GOTOFF) \n" \
" \n" \
- "_dl_exit: \n" \
- " mov r12, #" STR(SYS_exit) " \n" \
- " swi #0 \n" \
- " dsb nsh \n" \
- " isb \n" \
+ "_csu_abort: \n" \
" udf #0 \n" \
".previous");
-/* $OpenBSD: boot.h,v 1.34 2022/10/21 18:14:09 deraadt Exp $ */
+/* $OpenBSD: boot.h,v 1.35 2023/11/18 16:26:15 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#include <machine/reloc.h>
__dead
-void _dl_exit(int);
+void _csu_abort(void);
#include "archdep.h"
-/* $OpenBSD: boot_md.h,v 1.4 2022/10/27 19:40:21 deraadt Exp $ */
+/* $OpenBSD: boot_md.h,v 1.5 2023/11/18 16:26:16 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#include <machine/reloc.h>
__dead
-void _dl_exit(int);
+void _csu_abort(void);
#include "archdep.h"
-/* $OpenBSD: md_init.h,v 1.15 2020/10/15 16:30:23 deraadt Exp $ */
+/* $OpenBSD: md_init.h,v 1.16 2023/11/18 16:26:16 deraadt Exp $ */
/*
* Copyright (c) 2003 Dale Rahn. All rights reserved.
" copy %dp, %r19 \n" \
" .exit \n" \
" .procend \n" \
- " .export _dl_exit, entry \n" \
- " .type _dl_exit,@function \n" \
- " .label _dl_exit \n" \
+ " .export _csu_abort, entry \n" \
+ " .type _csu_abort,@function \n" \
+ " .label _csu_abort \n" \
" .proc \n" \
" .callinfo frame=0, calls \n" \
" .entry \n" \
- "_dl_exit: \n" \
- " stw %rp, -24(%sp) \n" \
- " ldil L%0xc0000000, %r1 \n" \
- " ble 4(%sr7, %r1) \n" \
- " ldi " STR(SYS_exit) ", %t1 \n" \
+ "_csu_abort: \n" \
" break 0,0 \n" \
" .exit \n" \
" .procend")
-/* $OpenBSD: md_init.h,v 1.12 2023/04/25 04:06:06 deraadt Exp $ */
+/* $OpenBSD: md_init.h,v 1.13 2023/11/18 16:26:16 deraadt Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
" call ___start # ___start(argc,argv,envp,0) \n" \
" \n" \
" .align 4 \n" \
- " .globl _dl_exit \n" \
- " .type _dl_exit,@function \n" \
- "_dl_exit: \n" \
- " mov $" STR(SYS_exit) ", %eax\n" \
- " int $0x80 \n" \
+ " .globl _csu_abort \n" \
+ " .type _csu_abort,@function \n" \
+ "_csu_abort: \n" \
" int3 \n" \
" .previous")
-/* $OpenBSD: md_init.h,v 1.9 2020/10/15 16:30:23 deraadt Exp $ */
+/* $OpenBSD: md_init.h,v 1.10 2023/11/18 16:26:16 deraadt Exp $ */
/*
* Copyright (c) 2012 Miodrag Vallat.
" addu %r4, %r4, 4 \n" \
" /* envp = argv + argc + 1 */ \n" \
\
- "_dl_exit: \n" \
- " or %r13, %r0, " STR(SYS_exit) " \n" \
- " tb0 0, %r0, 450 \n" \
- " or %r0, %r0, %r0 \n" \
+ "_csu_abort: \n" \
" tb0 0, %r0, 130 /* breakpoint */ \n" \
" .previous");
-/* $OpenBSD: boot_md.h,v 1.3 2022/10/27 19:40:23 deraadt Exp $ */
+/* $OpenBSD: boot_md.h,v 1.4 2023/11/18 16:26:16 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#include <machine/reloc.h>
__dead
-void _dl_exit(int);
+void _csu_abort(int);
#include "archdep.h"
-/* $OpenBSD: md_init.h,v 1.20 2020/10/20 15:26:59 visa Exp $ */
+/* $OpenBSD: md_init.h,v 1.21 2023/11/18 16:26:16 deraadt Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
" dla $t9, ___start \n" \
" jr $t9 \n" \
" .end __start \n" \
- " .globl _dl_exit \n" \
- " .ent _dl_exit \n" \
- " .type _dl_exit, @function \n" \
- "_dl_exit: \n" \
- " li $v0, " STR(SYS_exit) " \n" \
- " syscall \n" \
- " teq $zero, $zero, 0x52 \n" \
- " .end _dl_exit \n" \
+ " .globl _csu_abort \n" \
+ " .ent _csu_abort \n" \
+ " .type _csu_abort, @function \n" \
+ "_csu_abort: \n" \
+ " teq zero, zero, 0x52 \n" \
+ " .end _csu_abort \n" \
" .previous")
struct kframe {
-/* $OpenBSD: md_init.h,v 1.11 2020/10/15 16:30:23 deraadt Exp $ */
+/* $OpenBSD: md_init.h,v 1.12 2023/11/18 16:26:16 deraadt Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
" \n" \
" .text \n" \
" .align 2 \n" \
-" .globl _dl_exit \n" \
-" .type _dl_exit, @function \n" \
-"_dl_exit: \n" \
-" li %r0, " STR(SYS_exit) " \n" \
-" sc \n" \
+" .globl _csu_abort \n" \
+" .type _csu_abort, @function \n" \
+"_csu_abort: \n" \
" .long 0 # illegal \n" \
)
-/* $OpenBSD: md_init.h,v 1.4 2020/10/15 16:30:23 deraadt Exp $ */
+/* $OpenBSD: md_init.h,v 1.5 2023/11/18 16:26:16 deraadt Exp $ */
/*
* Copyright (c) 2020 Dale Rahn <drahn@openbsd.org>
" li %r6, 0 \n" \
" bl ___start \n" \
" \n" \
-" .globl _dl_exit \n" \
-" .type _dl_exit, @function \n" \
-"_dl_exit: \n" \
-" li %r0, " STR(SYS_exit) " \n" \
-" sc \n" \
+" .globl _csu_abort \n" \
+" .type _csu_abort, @function \n" \
+"_csu_abort: \n" \
" .long 0 # illegal \n" \
)
-/* $OpenBSD: md_init.h,v 1.3 2021/07/22 18:16:13 kettenis Exp $ */
+/* $OpenBSD: md_init.h,v 1.4 2023/11/18 16:26:16 deraadt Exp $ */
/*
* Copyright (c) 2020 Dale Rahn <drahn@openbsd.org>
*
" j ___start \n" \
" .size _start, .-_start \n" \
" .size __start, .-__start \n" \
- "_dl_exit: \n" \
- " li t0, " STR(SYS_exit) " \n" \
- " ecall \n" \
+ "_csu_abort: \n" \
" unimp \n" \
".previous");
-/* $OpenBSD: md_init.h,v 1.10 2020/10/15 16:30:23 deraadt Exp $ */
+/* $OpenBSD: md_init.h,v 1.11 2023/11/18 16:26:16 deraadt Exp $ */
/* $NetBSD: dot_init.h,v 1.3 2005/12/24 22:02:10 perry Exp $ */
/*-
" .long _DYNAMIC - .L_offbase \n" \
\
" .align 2 \n" \
- " .globl _dl_exit \n" \
- " .type _dl_exit,@function \n" \
- "_dl_exit: \n" \
- " mov #" STR(SYS_exit) ", r0 \n" \
- " .word 0xc380 /* trapa #0x80 */ \n" \
+ " .globl _csu_abort \n" \
+ " .type _csu_abort,@function \n" \
+ "_csu_abort: \n" \
" sleep /* illegal */ \n" \
".previous")
-/* $OpenBSD: md_init.h,v 1.9 2020/10/15 16:30:23 deraadt Exp $ */
+/* $OpenBSD: md_init.h,v 1.10 2023/11/18 16:26:16 deraadt Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
" ba,pt %icc, ___start \n" \
" clr %o1 \n" \
" \n" \
- " .global _dl_exit \n" \
- "_dl_exit: \n" \
- " mov " STR(SYS_exit) ", %g1 \n" \
- " t 0 \n" \
+ " .global _csu_abort \n" \
+ "_csu_abort: \n" \
" unimp \n" \
" .previous")
-/* $OpenBSD: archdep.h,v 1.8 2022/01/17 01:35:36 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.9 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
} else if (ELF_R_TYPE(r->r_info) == R_AARCH64_ABS64) {
*p = v + s->st_value + r->r_addend;
} else {
- _dl_exit(6);
+ _csu_abort();
}
}
-/* $OpenBSD: archdep.h,v 1.25 2022/01/31 05:44:13 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.26 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
} else if (ELF_R_TYPE(r->r_info) == RELOC_GLOB_DAT) {
*p = v + s->st_value + r->r_addend;
} else {
- _dl_exit(6);
+ _csu_abort();
}
}
-/* $OpenBSD: archdep.h,v 1.15 2022/01/17 01:35:36 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.16 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
} else if (ELF_R_TYPE(r->r_info) == R_X86_64_64) {
*p = v + s->st_value + r->r_addend;
} else {
- _dl_exit(6);
+ _csu_abort();
}
}
-/* $OpenBSD: archdep.h,v 1.15 2022/01/17 01:35:36 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.16 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
} else if (ELF_R_TYPE(r->r_info) == R_ARM_ABS32) {
*p += v + s->st_value;
} else {
- _dl_exit(6);
+ _csu_abort();
}
}
-/* $OpenBSD: archdep.h,v 1.18 2022/01/31 05:43:22 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.19 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 2004 Michael Shalayeff
p[0] = v + s->st_value + r->r_addend;
p[1] = pltgot;
} else {
- _dl_exit(5);
+ _csu_abort();
}
}
} else if (ELF_R_TYPE(r->r_info) == RELOC_PLABEL32) {
*p = v + s->st_value + r->r_addend;
} else {
- _dl_exit(6);
+ _csu_abort();
}
}
-/* $OpenBSD: archdep.h,v 1.23 2022/01/17 01:35:36 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.24 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
} else if (ELF_R_TYPE(r->r_info) == RELOC_32) {
*p += v + s->st_value;
} else {
- _dl_exit(6);
+ _csu_abort();
}
}
-/* $OpenBSD: archdep.h,v 1.10 2022/01/16 02:14:27 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.11 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
} else if (ELF_R_TYPE(r->r_info) == RELOC_32) {
*p = v + s->st_value + r->r_addend;
} else if (ELF_R_TYPE(r->r_info) != RELOC_NONE) {
- _dl_exit(ELF_R_TYPE(r->r_info) + 100);
+ _csu_abort();
}
}
-/* $OpenBSD: archdep.h,v 1.17 2022/01/17 19:45:34 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.18 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 1998-2002 Opsycon AB, Sweden.
else \
*adrp += val; \
} else if (ELF_R_TYPE(relp->r_info) != R_MIPS_NONE) { \
- _dl_exit(ELF_R_TYPE(relp->r_info)+100); \
+ _csu_abort(); \
} \
} while (0)
if (sp->st_shndx == SHN_UNDEF || \
sp->st_shndx == SHN_COMMON) { \
if (ELF_ST_BIND(sp->st_info) != STB_WEAK) \
- _dl_exit(7); \
+ _csu_abort(); \
} else if (ELF_ST_TYPE(sp->st_info) == STT_FUNC) { \
*gotp += __loff; \
} else { \
-/* $OpenBSD: archdep.h,v 1.25 2022/01/17 01:35:36 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.26 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
if (((val & 0xfe000000) != 0) &&
((val & 0xfe000000) != 0xfe000000)) {
/* invalid offset */
- _dl_exit(20);
+ _csu_abort();
}
val &= ~0xfc000000;
val |= 0x48000000;
} else if (ELF_R_TYPE((r)->r_info) == RELOC_GLOB_DAT) {
*p = v + s->st_value + r->r_addend;
} else {
- _dl_exit(6);
+ _csu_abort();
}
}
-/* $OpenBSD: archdep.h,v 1.4 2022/01/16 02:16:40 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.5 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
if (((val & 0xfe000000) != 0) &&
((val & 0xfe000000) != 0xfe000000)) {
/* invalid offset */
- _dl_exit(20);
+ _csu_abort();
}
val &= ~0xfc000000;
val |= 0x48000000;
} else if (ELF_R_TYPE((r)->r_info) == R_PPC64_GLOB_DAT) {
*p = v + s->st_value + r->r_addend;
} else {
- _dl_exit(6);
+ _csu_abort();
}
}
-/* $OpenBSD: archdep.h,v 1.4 2022/01/16 02:17:05 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.5 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 2021 Dale Rahn <drahn@openbsd.org>
} else if (ELF_R_TYPE(r->r_info) == R_RISCV_64) {
*p = v + s->st_value + r->r_addend;
} else {
- _dl_exit(6);
+ _csu_abort();
}
}
-/* $OpenBSD: archdep.h,v 1.14 2022/01/17 01:35:36 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.15 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
} else if (ELF_R_TYPE(r->r_info) == R_SH_DIR32) {
*p = s->st_value + v + r->r_addend;
} else {
- _dl_exit(6);
+ _csu_abort();
}
}
-/* $OpenBSD: archdep.h,v 1.28 2022/01/17 01:35:36 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.29 2023/11/18 16:26:17 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
if (ELF_R_TYPE(r->r_info) == RELOC_RELATIVE) {
*p = v + r->r_addend;
} else {
- _dl_exit(6);
+ _csu_abort();
}
}