Age | Commit message (Collapse) | Author |
|
ok otto@ guenther@
|
|
|
|
|
|
legitimately use random section variables without execve failures...
Because this section is not demand faulted, yield() every page during
the fill otherwise the costs are charged poorly.
ok tedu matthew
|
|
|
|
so that the remaining information is more visible
ok kettenis miod
|
|
contain "LD_TRACE_LOADED_OBJECTS" support, so this gets done by calling
RTLD_TRACE directly.
ok guenther
|
|
using it, so it warns... Copy the warning silencing code from the
same function in ../ld.so
|
|
|
|
ok millert, thanks to doug for process advice
|
|
archdep.h help from kettenis@
|
|
the constants whenever they fit, and avoiding saving and restoring
registers we don't need to preserve.
|
|
Fixes remaining problems with static PIE on mips64.
|
|
fails.
ok kurt@
|
|
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@
|
|
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@
|
|
|
|
towards a wimpy (but sufficient) model, kurt and kettenis got upset enough
to do it the right way, right away before we got out of hand. Bravo!
We no longer need /sbin/ld.so on the new roadmap.
|
|
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@
|
|
|
|
|
|
PIE possible.
ok deraadt@ tedu@
|
|
relocations, but will always call public symbols through the library's PLT.
|
|
|
|
the address of the symbol must always resolve to the entry in the main
program's plt, regardless of which object the address resolution is performed
for, so that addresses (pointers) can be compared reliably.
However, depending on how far away library load address randomization places
the library, the main program's plt address might be too far away from the
library itself for its DISP26 relocations to fit in the required relative
displacement range.
Since DISP26 relocations can only be used in code for branches, it is safe
to resolve them to the actual address within the library, and avoid producing
out of bounds displacements.
|
|
that these don't get reset for every relocation being processed (oops).
ok guenther@ deraadt@
|
|
|
|
ok deraadt@
|
|
ok espie@ deraadt@ millert@ tedu@
|
|
pointed out by 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@
|
|
distribution in the placement of malloc's dir_info.
ok otto@ deraadt@
|
|
|
|
millert@ made changes to realpath.c based on FreeBSD's version. I merged
Todd's changes into dl_realpath.c.
ok millert@, guenther@
|
|
ok deraadt@
|
|
ok deraadt@
|
|
Pointed out by LLVM.
ldasm.S:111:74: error: unexpected token in '.type' directive
.section ".text" ; .align 4 ; .global _dl_issetugid ; .type _dl_issetugid%function ;_dl_issetugid: ; movl $253,%eax; int $0x80 ; jb .L_cerr ; ret
^
ok guenther@
|
|
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@
|
|
Explicitly zero-clear stack array to read dynamic segments. This code has
been working because stack is mapped as anon and zero'ed right after execve(2).
Found by work-in-progress Valgrind port for OpenBSD/amd64.
OK millert@ 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
|
|
|
|
|
|
see the fds used by dlopen()
ok otto@ miod@
|
|
ok otto@ miod@
|
|
of post-open tests and fixups. Also, reorder _dl_dirdesc to save
8 bytes on LP64.
ok otto@ miod@
|
|
the stack adjustments/handling in the asm. Based on FreeBSD.
ok kettenis@ matthew@
|
|
|
|
|