Age | Commit message (Collapse) | Author |
|
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@
|
|
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
|
|
or doing non-lazy relocation processing.
ok guenther@
|
|
ok guenther
|
|
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)
|
|
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
|
|
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@
|
|
to follow. While here add some gcc __predict hints.
Much discussion with and assistance from miod and deraadt
ok deraadt@
|
|
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@
|
|
Also, make a comment not lie: use the V9 ISA's relative branch
immediate instruction for short (with in 2^19 words) PLT branches.
ok miod@
|
|
(previously completely retarded) stack_smash_handler of ld.so
ok beck miod tedu
|
|
ok otto@ miod@
|
|
|
|
|
|
|
|
version will match the (upcoming) 32-bit version (for sparc) and allegedly
is slightly faster.
|
|
ABI, and stop calling atexit(4) directly from ld.so on sparc64
|
|
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@
|
|
the offset in the wrong direction, failing to take into account where in the
relocation the jump would be, and not even using the right instructions in
one case. Fortunately(?), the test of whether the offset was small enough
had signed-vs-unsigned bugs too, so it was never used.
ok miod@
|
|
ok guenther millert kettenis
|
|
ok matthew@ deraadt@
|
|
for passing around a pointer to a cleanup function and we'd like to use it
for that purpose in the near future.
ok miod@
|
|
for chars.
|
|
so it works correctly with large offsets (and matches other systems).
This requires adding a new getdirentries syscall, with the old one
renamed to ogetdirentries. All in-tree consumers of getdirentries()
have been updated. Bump libc and libpthread major numbers.
OK and with deraadt@
|
|
|
|
Apparently gcc4 uses them in cases where gcc3 didn't. Fixes segmentation
faults with gcc4 because the space for the slots was colliding with
the space for dl_data that we allocated on the stack.
ok miod@
|
|
ok drahn@
|
|
eyeballed by deraadt@ and drahn@
|
|
ok miod@, deraadt@, jsing@
|
|
use _dl_mmap_error() to check for mmap() errors. Adjust datatypes of
some local vars for 64-bit safety.
okay millert@ drahn@
|
|
ok kurt@
|
|
- rename private values in struct elf_object to better
describe their meaning:
s/load_offs/obj_base/ "object's address '0' base"
s/load_addr/load_base/ "The base address of the loadable
segments"
- gdb needs the obj_base value so swap positions with load_base in
struct elf_object
- fix a few occurrences of where load_base was used instead of
obj_base.
With help and okay drahn@
|
|
that we don't accidentally touch the page after the GOT.
ok drahn@
|