Age | Commit message (Collapse) | Author |
|
ok kettenis guenther
|
|
ok jasper@, jca@, deraadt@
|
|
superseded by the generic ?WX and RELRO support. Stop trying to look
up and use them.
ok kettenis@ deraadt@
|
|
which is largely MI.
ok visa kettenis
|
|
|
|
simply exiting, via helper functions _dl_die(), _dl_diedie(), and
_dl_oom().
prompted by a complaint from jsing@
ok jsing@ deraadt@
|
|
Move _dl_mmap() and _dl_mquery() inlines from archdep.h to syscall.h and
remove pointless casts and unnecessary parens.
ok kettenis@
|
|
ok deraadt@
|
|
instead. Result in a few more pages that aren't writable on some platforms
(such as hppa). Based on an initial diff from guenther@.
Thanks to deraadt@ for testing.
ok guenther@
|
|
ok deraadt@
|
|
ok deraadt@
|
|
save that and pass it to _dl_boot_bind() too
|
|
for our development process.
ok kettenis@ deraadt@
|
|
possible EXEC permission for the section, because the proper permission
is set late, and there are no thread concerns here. Avoids W^X issues
in oddball cases.
ok guenther kettenis
|
|
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!
Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!
Clean up libpthread's symbol exports like libc.
On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.
Testing by various, particularly sthen@ and patrick@
ok kettenis@
|
|
as osendsyslog for a while. The three argument variant is the only
one that will stay.
input kettenis@; OK deraadt@
|
|
and pass the LOG_CONS flag like libc's handler.
ok deraadt@ bluhm@ (who had a similar diff)
|
|
portion like crt0 does. This is prep for eliminating _dl_fixup_user_env()
Mark almost everything in resolve.h as hidden, to improve code generation.
ok kettenis@ mpi@ "good time" deraadt@
|
|
|
|
just the dynamic tags are needed instead of reusing the generic elf_object_t
structure.
testing and feedback from miod@
ok kettenis@
|
|
that it should show information about the program it loads, rather than
run it. In that specific case, ld.so can pledge to "stdio rpath" to
ensure that code path in ld.so has no bugs.
Yes, a pledge in ld.so.... who'd have thought!
ok guenther
|
|
a new MI routine _dl_protect_segment(), and use that for protecting the
GOT and--on some archs--the PLT.
Amazing testing turnaround by miod@, who apparently violated relativity
to get back results on some archs as fast as he did
|
|
where they end, there is a good chance they are sharing a page with .data,
which obviously needs to remain writable. So only attempt to make them
read-only if we know they have a non-zero size. Original diff from guenther@
based on an earlier diff from me. Fixes ld -Z on alpha.
ok miod@, guenther@
|
|
the callback, and the sigprocmask stub.
Keep around the DL_SETBINDLCK case until libpthread stops using it.
discussed with miod@ at l2k15
ok kettenis@
|
|
necessary
ok deraadt@ jsing@
|
|
Use kbind for lazy binding GOT/PLT updates on alpha and mips64.
While here add some gcc __predict hints.
Much discussion with and assistance from miod and deraadt
ok deraadt@
|
|
means read-only, which our ld.so already enforced, but a smaller plt section).
|
|
relocation in _reloc_alpha_got(), and teach RELOC_RELA() to skip R_ALPHA_NONE
relocations (which are just nops used to fill out the relocation table).
Handling R_ALPHA_NONE relocations will be necessary for static PIE support
and it is not inconceivable that ld.so will end up with such relocations
at some point.
ok kurt@
|
|
PLT is empty/unused. On at least macppc and sparc64, ld.so's attempt
to mprotect its PLT could instead hit its own allocated data and
cause a segfault shortly there after.
While here, take a shot at preventing the same issue with the GOT
by checking for __got_start != __got_end.
reproduction *with ktracing* by afresh1@ provided the key data
ok miod@ deraadt@
|
|
discussion, help and ok guenther@
|
|
asm suggestion from kettenis@
tested by miod@, suffering under the brain-destroying summer heat
|
|
(previously completely retarded) stack_smash_handler of ld.so
ok beck miod tedu
|
|
ok otto@ miod@
|
|
|
|
|
|
with a negative value (I'm looking at you, _dl_mmap);
|
|
|
|
from ld.so on alpha. Note that this means that binaries built before early
december may no longer call destructors in shared libraries implemented in
C++. Update your packages!
|
|
a2 to zero in the kernel and ld.so. This will let us add the
conditional atexit() call to crt0
ok kettenis@ miod@
|
|
members to 64bit types. Assign new syscall numbers for (almost
all) the syscalls that involve the affected types, including anything
with time_t, timeval, itimerval, timespec, rusage, dirent, stat,
or kevent arguments. Add a d_off member to struct dirent and replace
getdirentries() with getdents(), thus immensely simplifying and
accelerating telldir/seekdir. Build perl with -DBIG_TIME.
Bump the major on every single base library: the compat bits included
here are only good enough to make the transition; the T32 compat
option will be burned as soon as we've reached the new world are
are happy with the snapshots for all architectures.
DANGER: ABI incompatibility. Updating to this kernel requires extra
work or you won't be able to login: install a snapshot instead.
Much assistance in fixing userland issues from deraadt@ and tedu@
and build assistance from todd@ and otto@
|
|
error: indirection of non-volatile null pointer will be deleted, not trap [-Werror,-Wnull-dereference]
Suggestion from matthew@
Ok matthew@ miod@
|
|
ok matthew@ millert@
|
|
whitespace, and no argument names.
ok matthew@ deraadt@
|
|
each plt call, allowing to trace a binary linked against shared library at the
public function call level.
To do so, ltrace(1) sets up some environment variables to enable plt tracing
in ld.so, and invokes ktrace(2) for utrace events. ld.so will force lazy
binding and will send an utrace record in the plt resolver, without updating
the plt.
Minimal filtering capabilities are provided, inspired by Solaris' truss -u,
to limit tracing to libraries and/or symbol names. Non-traced libraries and
symbols will have the regular resolver processing, with the expected plt
update.
"Get it in" deraadt
|
|
Much assistance and testing by miod
ok miod@
|
|
Improvements and okay matthew@, millert@, guenther@
|
|
ok guenther millert kettenis
|
|
ok matthew@ deraadt@
|
|
constants are constructed with several instructions rather than
loaded from the data segment, avoiding relocations.
This fixes ld.so with gcc4. From miod@, ok jsg@
|
|
|