summaryrefslogtreecommitdiff
path: root/lib/csu/crtbegin.c
AgeCommit message (Collapse)Author
2015-11-10libc.so can't be unloaded, so move the hidden atexit() and pthread_atfork()Philip Guenther
stubs for the executable from crtbegin.o into libc, which lets them be excluded from static links that don't use them. For this, drop the normal crt{begin,end}S.o from libc.so: the .init and .fini sections for libc aren't called at the right times anyway, so it's good that they're unused. libc.so just needs __guard_local and the .note.openbsd.ident section, so add them to stack_protector.c for now (this will be improved) "good time" deraadt@
2015-04-07Make pthread_atfork() track the DSO that called it like atexit() does,Philip Guenther
unregistering callbacks if the DSO is unloaded. Move the callback handling from libpthread to libc, though libpthread still overrides the inner call to handle locking and thread-library reinitialization. Major version bump for both libc and libpthread. verification that this fixes various ports ajacoutot@ asm assistance miod@; ok millert@ deraadt@
2015-04-04gcc 2.x is deadPhilip Guenther
ok millert@
2013-12-28Move atexit(3) into crtbegin.c and certbeginS.c such that we can pass theMark Kettenis
right __dso_handle and have dlopen'ed shared objects run their atexit handlers when they get unloaded. This is what Linux does, and several ports depend on this behaviour (and will crash upon exit without this chang). Based on an earlier diff from matthew@ Tested by ajacoutot@ ok deraadt@
2012-09-08Reverse the order that ctors and dtors are run in accordance withMatthew Dempsky
GCC's documentation. Fixes GNU C++'s init_priority attribute. ok miod
2012-08-28Add __guard_local as a hidden symbol to ld.so, kernel, and everyMatthew Dempsky
executable and DSO (via crtbegin.c/crtbeginS.c). Not used yet, but needed before GCC can start emitting -fstack-protector code that uses them instead of __guard.
2010-05-01Sprinkle a few __used markers to prevent gcc4 from throwing away essentialMark Kettenis
bits of code and data. With this change gcc4 builds usable crt*.o on sparc64, other architectures probably need some more love. ok marco@, jsg@
2009-04-13Add gcj java class registration hooks for gcc3 elf archs. From NetBSDKurt Miller
with minor differences. okay kettenis@ drahn@
2007-09-03Add __cxa_atexit() support for gcc3. This provides support for shared ↵Todd C. Miller
object destructors called at dlclose() time. Inspired by similar changes in FreeBSD and NetBSD.
2004-10-26Change __register_frame_info into a weakly defined symbol.Mark Kettenis
ok drahn@, pval@, deraadt@
2004-10-10Add support for DWARF2 exception handling.Mark Kettenis
ok drahn@, millert@
2004-01-26add finalized guard to destructor calls, to prevent multiple calls.Marc Espie
stop most kde apps from burping all over the place on exit, which means that, somehow, our destructors get registered twice... :-( Okay drahn@
2004-01-26small clean-up: typedef to desambiguate const, prototypes...Marc Espie
ok drahn@, some time ago.
2004-01-08__init/__fini handling on ELF has not been correct. It is supposed toDale Rahn
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@
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-02-03oops.Artur Grabowski
2001-02-03Schedule running of __fini in __init, not __start.Artur Grabowski
2001-02-03Add an OS note identifying OpenBSD binaries.Artur Grabowski
This appears to be the standard way to do it.
2001-02-03Decruftification.Artur Grabowski
2001-02-03Create a common_elf directory with crtbegin and crtend that canArtur Grabowski
be shared between archs.