CVSROOT:        /cvs
Module name:    src
Changes by:     k...@cvs.openbsd.org    2014/12/21 20:51:08

Modified files:
        lib/csu        : Makefile crt0.c 
        lib/csu/amd64  : md_init.h 
        libexec/ld.so/amd64: archdep.h 
Added files:
        lib/csu        : boot.h 

Log message:
Introduce new csu0 variant for -static -pie binaries to use called
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@

Reply via email to