#
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@
|
#
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 ...
|
#
36d5f108 |
| 19-Sep-2015 |
kettenis <kettenis@openbsd.org> |
We don't need to calculate the load offset. This also means we don't need to calculate the GOT address anymore.
ok guenther@ (who spotted the latter bit)
|
#
2955bdab |
| 09-Sep-2015 |
kettenis <kettenis@openbsd.org> |
Fetch the _GLOBAL)OFFSET_TABLE_ and _DYNAMIC pointers in a way that's compatible with the Secure-PLT ABI.
|
#
47ce292a |
| 09-Sep-2015 |
kettenis <kettenis@openbsd.org> |
Now that ld(1) will generate a read-only GOT for truly static binaries, we no longer have to use mprotect(2) to take away PROT_WRITE. This fixes ld -Z and paves the way for the new Secure-PLT ABI.
Now that ld(1) will generate a read-only GOT for truly static binaries, we no longer have to use mprotect(2) to take away PROT_WRITE. This fixes ld -Z and paves the way for the new Secure-PLT ABI.
ok miod@
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@@
|
#
91b3131d |
| 26-Dec-2014 |
kurt <kurt@openbsd.org> |
Self-relocation code for powerpc.
|
#
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@
|
#
8d0ba7c9 |
| 08-Jan-2004 |
drahn <drahn@openbsd.org> |
__init/__fini handling on ELF has not been correct. It is supposed to be a section which code stubs (branches) can be added to initialize/destructor This adds MD stubs to allow this to operate as exp
__init/__fini handling on ELF has not been correct. It is supposed to be a section which code stubs (branches) can be added to initialize/destructor This adds MD stubs to allow this to operate as expected. should fix wine and behave according to ELF specs. ok miod@
show more ...
|