Age | Commit message (Collapse) | Author |
|
Export _gmonparam again.
Make gcrt0.o use an reserved name for _monstartup()
ok millert@
|
|
with strong symbols in ld.so don't do what we need, so put definitions back
in crt0 and make ld.so update __progname like it does environ.
report and testing patrick@ jsg@
|
|
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@
|
|
ok kettenis@ mpi@
|
|
overriding
ok deraadt@ kettenis@
|
|
lots of agreement.
|
|
just the dynamic tags are needed instead of reusing the generic elf_object_t
structure.
testing and feedback from miod@
ok kettenis@
|
|
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@
|
|
to calculate the GOT address anymore.
ok guenther@ (who spotted the latter bit)
|
|
ok guenther@
|
|
compatible with the Secure-PLT ABI.
|
|
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@
|
|
With much assistance from miod@
ok deraadt@@
|
|
in our binaries.
ok miod@
|
|
|
|
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@
|
|
ok millert@
|
|
other ports do.
|
|
ok guenther millert doug
|
|
value, which we have no use for. ok kettenis@
|
|
archdep.h help from kettenis@
|
|
ok kurt@
|
|
fails.
ok kurt@
|
|
ok miod@
|
|
This adds alpha-specific first-pass GOT relocation code to boot.h.
The assembly code is pure magic. The numeric register
names don't make it easier to understand (or compare with the
equivalent ld.so code). Unfortunately the assembler only understands
a few symbolic register names.
Renames the crt0.o entry point to __start. Our compiler was already using
__start and the linker will soon follow.
ok kurt@
|
|
|
|
|
|
to determine if DT_JMPREL relocations are REL or RELA and conditionally
perform DT_JMPREL in either REL or RELA as needed (idea from kettenis@).
Remove unneeded i386 RELA implementation. i386 static pie working now.
okay kettenis@
|
|
|
|
architectures with variable page size.
|
|
Note that ommitting PROT_EXEC for the PLT is deliberate; static PIE
binaries should never actually hit the PLT.
We're still debating what to do when mprotect(2) fails. But that is no
excuse not to at least attempt to fix things up.
ok deraadt@
|
|
instead handle it internally as $ra
solution from kettenis, ok guenther
|
|
|
|
|
|
|
|
|
|
sure we move on to the next relocation entry.
While there, also skip relocations for REL architectures.
|
|
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@
|