History log of /openbsd-src/lib/csu/sh/md_init.h (Results 1 – 11 of 11)
Revision Date Author Comments
# 1e43641e 18-Nov-2023 deraadt <deraadt@openbsd.org>

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 w

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

show more ...


# 2bc3a8c0 15-Oct-2020 deraadt <deraadt@openbsd.org>

crt0 MD _dl_exit() performs syscall to SYS_exit directly, but then
some of these functions were returning. That makes the +1word address
a fairly strong and easily located gadget. Put a hard-trap
i

crt0 MD _dl_exit() performs syscall to SYS_exit directly, but then
some of these functions were returning. That makes the +1word address
a fairly strong and easily located gadget. Put a hard-trap
instruction after the syscall. This remains a gadget for 'terminal
system' calls (such as execve), but hey that's why we have pledge w/o
"exec" throughout the tree.
Quite surprisingly, hppa's delay-slot load of SYS_exit makes it the
safest of the bunch, not that this helps anyone.
ok kettenis

show more ...


# 9c558c11 14-Oct-2020 deraadt <deraadt@openbsd.org>

use symbolic SYS_exit instead of the value 1
ok kettenis


# 344baaa7 11-Aug-2017 guenther <guenther@openbsd.org>

_dl_printf is no longer referenced by RELOC_{JMPREL,DYN,GOT}; delete the stub

ok kettenis@


# 48c2532c 19-Jan-2017 guenther <guenther@openbsd.org>

MD_START is now always ___start, so expand and eliminate it

ok phessler@ deraadt@


# 5af055cd 20-Mar-2016 guenther <guenther@openbsd.org>

Rearrange C runtime bits: now that ld.so exports environ and __progname,
move their definitions and initialization in static links to libc.a
Make crt0 always invoke a new func _csu_finish() in libc t

Rearrange C runtime bits: now that ld.so exports environ and __progname,
move their definitions and initialization in static links to libc.a
Make crt0 always invoke a new func _csu_finish() in libc to process the auxv
and to either register the ld.so cleanup function (in dynamic links) or
initialize environ and __progname and do MC_DISABLE_KBIND (in static links).
In libc, get pagesize from auxv; cache that between getpagesize() and
sysconf(_SC_PAGESIZE)

ok mpi@ "good time" deraadt@

show more ...


# 0a8a9c34 01-Sep-2015 guenther <guenther@openbsd.org>

In static binaries, invoke kbind() once to disable it.

With much assistance from miod@
ok deraadt@@


# 9fccad30 30-Dec-2014 miod <miod@openbsd.org>

self-relocating crt0 bits for sh, and enable static pie by default. With some
archdep.h help from kettenis@


# b5aa3b33 18-Apr-2014 guenther <guenther@openbsd.org>

It's been a quarter century: we can assume volatile is present with that name.


# 453b49cd 03-Dec-2013 guenther <guenther@openbsd.org>

Merge the per-arch crt0.c files into common_elf/crt0.c, with MD macros in
the md_init.h files.

Worked out with and ok miod@; ok matthew@


# cf252584 10-Oct-2006 miod <miod@openbsd.org>

Preliminary userland bits for OpenBSD/landisk, many things coming from
NetBSD.