diff options
author | guenther <> | 2019-06-02 01:03:01 +0000 |
---|---|---|
committer | guenther <> | 2019-06-02 01:03:01 +0000 |
commit | a6e675c6e949db993e297cb4af8780a6a40a5b9c (patch) | |
tree | 7d7261eb7ce107c1c6d6a5b9fe7ff3e3204af517 /src/regress/lib/libc/malloc/malloc_general/malloc_general.c | |
parent | cb1e90dd877fb015ed84ee7e9d87092087c31e09 (diff) | |
download | openbsd-a6e675c6e949db993e297cb4af8780a6a40a5b9c.tar.gz openbsd-a6e675c6e949db993e297cb4af8780a6a40a5b9c.tar.bz2 openbsd-a6e675c6e949db993e297cb4af8780a6a40a5b9c.zip |
Complete the ld.so boot cleanup: move most libc initialization from
_csu_finish() to _libc_preinit(), which is an .init_array function
in shared libc (and mark it INITFIRST) or a .preinit_array function
in static libc, grabbing the _dl_cb callback there from ld.so. Then
in _csu_finish(), invoke the dl_clean_boot() callback to free ld.so's
startup bits before main() gets control.
Other cleanups this permits:
- move various startup structures into .data.rel.ro
- the dl* stubs in libc can be strong and call the callbacks provided
via _dl_cb
- no longer need to conditionalize dlctl() calls on presence of _DYNAMIC
original concept and full diff ok kettenis@
ok deraadt@
Diffstat (limited to 'src/regress/lib/libc/malloc/malloc_general/malloc_general.c')
0 files changed, 0 insertions, 0 deletions