| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
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@
|