summaryrefslogtreecommitdiff
path: root/lib/csu/m88k
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2023-11-18 16:26:18 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2023-11-18 16:26:18 +0000
commiteebaec8bf69b2db1088ab7a84b8bc96a3d02473e (patch)
tree01c4cdb241357ce61e341e655dd01bce0c5d750d /lib/csu/m88k
parent9039430940e09de13f4467d9fd1a12296a6746f4 (diff)
crt0 uses a helper function in a MD src/libexec/ld.so .h file (rather than
reproducing the relevant defines and code in a different place) to perform minor relocations. If things go very wrong, it would call _dl_exit() -- a locally defined crt0 function which is syscall exit(2). We don't need to call exit(2) for this obscure case which doesn't happen and provides no debugging information. An 'abort' is going to provide better information. So let's change the function name to _dso_abort() and make it a single illegal instruction. ok guenther
Diffstat (limited to 'lib/csu/m88k')
-rw-r--r--lib/csu/m88k/md_init.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/csu/m88k/md_init.h b/lib/csu/m88k/md_init.h
index f73ed3e23bf..6f37b9d2f6f 100644
--- a/lib/csu/m88k/md_init.h
+++ b/lib/csu/m88k/md_init.h
@@ -1,4 +1,4 @@
-/* $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.
@@ -99,9 +99,6 @@
" 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");