Age | Commit message (Collapse) | Author |
|
rcsu0.o where the initial 'r' is for relocatable. rcsu0.o performs
self-relocation on static pie binaries by calling a slightly modified
copy of ld.so's _dl_boot_bind() in boot.h.
The first arch implementatation is also included for amd64 where
__start calls _dl_boot_bind() and then calls ___start(). Includes
parts from kettenis@ to help get R_X86_64_64 relocations working
and proper handling for undefined weak symbols.
This is the first part of several to get static pie self-relocating
binaries working. binutils, gcc and kernel changes are forthcoming
to complete the solution, then per-arch implementations are needed
for MD_RCRT0_START in csu.
okay kettenis@ pascal@ deraadt@
|
|
|
|
special case; no binary change
ok kettenis@
|
|
ok miod@ deraadt@
|
|
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@
|
|
defined and we don't think ld.so has already done the TCB setup.
ok and much discussion miod@
|
|
the md_init.h files.
Worked out with and ok miod@; ok matthew@
|
|
ok guenther millert kettenis
|
|
GCC's documentation. Fixes GNU C++'s init_priority attribute.
ok miod
|
|
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.
|
|
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@
|
|
32 bit ints on OpenBSD.
ok kettenis@
|
|
with minor differences.
okay kettenis@ drahn@
|
|
okay kettenis@ drahn@
|
|
ok kurt@, drahn@, miod@
|
|
object destructors called at dlclose() time. Inspired by similar changes in FreeBSD and NetBSD.
|
|
ok drahn@, pval@, deraadt@
|
|
ok drahn@, millert@
|
|
stop most kde apps from burping all over the place on exit, which
means that, somehow, our destructors get registered twice... :-(
Okay drahn@
|
|
ok drahn@, some time ago.
|
|
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@
|
|
ok espie, millert
|
|
henric@ henning@ ok
|
|
|
|
is not newline terminated.
From Thorsten Glaser
|
|
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
|
|
versions of these files.
Fixed a bug in ld.so in this, instead of scheduling the fini of each of
the shared libraries with atexit. schedule a function of ld.so itself
and it will walk all of the open libraries when the program exits.
otherwise a shared library could be dl_open()ed and then dl_close()d
and then it would not be mapped for the atexit processing.
TODO:
What if atexit is not found (process did not link against libc?)
Do shared libraries that are dl_closed have their global destructors run?
|
|
|
|
|
|
|
|
This appears to be the standard way to do it.
|
|
|
|
be shared between archs.
|
|
build flags into conditionals in the Makefile, fixing a few inconsistencies
in the process.
\o/ miod@
|
|
ok miod@
|
|
|
|
to a 16 byte boundary in csu (similar to what the other arches where
_STACKALIGNBYTES != _ALIGNBYTES do).
This is necessary for long double variables on the stack to be correctly
aligned.
|
|
|
|
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@
|
|
means we no longer rely on how the C compiler sets up the initial stack frame
and allows us to get rid of MD_NO_CLEANUP.
ok deraadt@, guenther@
|
|
work.
ok deraadt@, guenther@
|
|
|
|
defined and we don't think ld.so has already done the TCB setup.
ok and much discussion miod@
|
|
with and ok guenther
|
|
the md_init.h files.
Worked out with and ok miod@; ok matthew@
|
|
NetBSD.
|
|
Delete unused #ifndef SCRT0 conditionals.
ok miod@
|
|
callback for about a year, so it's safe to make __start() pass that
as the cleanup argument to ___start(), and have *that* conditionally
pass it to atexit(). Eliminate the no-longer-used obj and ps_strings
arguments to position things correctly, simplifying the ASM wrapper
slightly.
ok kettenis@ miod@; testing patrick@
|
|
callback for about a year, so it's safe to make __start() treat
that as the cleanup argument and conditionally pass it to atexit().
Eliminate the no-longer-used obj and ps_strings arguments to position
things correctly, which lets us eliminate the ASM wrapper completely.
ok kettenis@ miod@
|
|
for about a year, so it's safe to add the test and atexit() call.
While here, drop the no-longer-used obj and ps_strings and the
asm to set those up, switch from sys/param.h to limits.h, and ANSIfy.
ok kettenis@
|