Age | Commit message (Collapse) | Author |
|
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
|
|
when linked against non-pic material (such as linking against libgcc without
passing -fpic or -fPIC on the commandline).
Given the large userland address space (4GB) and random library placement, it
is unlikely that these relocations can ever suceed anyway (DISP26 only allows
for a 256MB offset); _dl_exit() in that case, after printing a warning message.
That's better than dumping core.
|
|
Much assistance and testing by miod
ok miod@
|
|
ok sthen@ jung@ fgsch@
|
|
of the .plt whenever possible, and fallback to the old behaviour of searching
for special symbols pointing to its boundaries. No functional change.
|
|
ok matthew
|
|
Improvements and okay matthew@, millert@, guenther@
|
|
|
|
relocation to correctly process RelA entries.
This allows lazy binding to work so far; not enabled yet, must survive some
serious churning first.
|
|
still puzzled why this didn't work back in 2010, but it does work now and
paves the way for binutils 2.17 on hppa. Obviously based on miod@'s earlier
diff.
ok miod@
|
|
ok guenther
|
|
pointers to prepare for adding rpath ORIGIN support.
okay matthew@ millert@
|
|
|
|
MI man pages, even if vax currently lacks the programs)
|
|
|
|
|
|
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@
|
|
|
|
invoked with lazy binding.
|
|
NetBSD.
|
|
object relocation, if loaded at a different address than the one it was
compiled for; unsurprisingly fixes some spurious crashes.
|
|
This makes lazy binding work, so don't disable it anymore.
|
|
wrong RELOC_JMP_SLOT define workaround.
|
|
does not work beyond the first few lazy resolver calls. But that's already
enough to run simple binaries.
|
|
no buckets in it (could happen if the administrator reruns ldconfig with
bogus paths). ok matthew@ kurt@ drahn
|
|
time: the logic is wrong, and there are no relocations to apply to .rodata
anyway.
ok jsing@ kettenis@
|
|
global data initializers to work as intended.
ok drahn kettenis@
|
|
harmless because we have full control over the array being processed, and none
of the values we set up may trigger the bug; yet this may change in the future.
ok drahn matthew@
|
|
|
|
not exist yet.
|
|
|
|
the main program should not register a cleanup handler with atexit(3).
This will allow us to add the cleanup handler registration code to crt0.c
and have ld.so pass its cleanup handler to the main program in the future.
tested by tobiasu@
ok kurt@
|
|
ok guenther millert kettenis
|
|
the main program should not reguster a cleanup handler with atexit(3).
This will allow us to add the cleanup handler registration code to crt0.c
and have ld.so pass its cleanup handler to the main program in the future.
While there, also zero ra to mark the last stack frame as demanded by the ELF
ABI.
ok kurt@, miod@
|
|
|
|
|
|
ok matthew@ deraadt@
|
|
the main program should not register a cleanup handler with atexit(3).
This will allow us to add the cleanup handler registration code to crt0.c
and have ld.so pass its cleanup handler to the main program in the future.
ok kurt@
|
|
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 passing around a pointer to a cleanup function and we'd like to use it
for that purpose in the near future.
ok miod@
|
|
EXIT STATUS one;
ok guenther
|
|
Makes "make build" build with WARNINGS=Yes on amd64.
ok espie
|
|
problem initially noticed by deraadt@, exchanged various patches with
kettenis@
decided to fix the bug now, even though ldconfig could probably use
a larger rewrite.
okay matthew@
|
|
so mkdep can find it. This was breaking builds after recent
changes to mkdep to error out if the compiler does.
ok deraadt@
|
|
ld.so itself, but also make it easier to debug code that uses dlopen(3).
ok deraadt@, matthew@
|
|
it isn't NULL before we dereference it.
Fixes perl PIE on hppa.
ok matthew@, deraadt@
|
|
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.
|
|
initializing their __guard values. For the time being, we're leaving
libc's constructor method as a backup to make sure __guard actually
gets initialized and to emit syslog warnings when it's not.
Not really an ABI change, so no shlib bump... "hold on to your butts"
ok deraadt, kettenis
|
|
segments to the kernel, ld (2.15), and ld.so. Tested on alpha, amd64,
i386, macppc, and sparc64 (thanks naddy, mpi, and okan!).
Idea discussed for some time; committing now for further testing.
ok deraadt
|
|
"memory" to the list of clobbered registers for all syscalls that
accept a pointer. This prevents GCC from optimizing away memory loads
and stores that otherwise appear unused in a function.
Issue noted and identified by miod; fix by me.
ok miod, mpi
|