In article <20170531085212.gb22...@britannica.bec.de>, Joerg Sonnenberger <jo...@bec.de> wrote: >On Tue, May 30, 2017 at 05:38:33PM -0400, Christos Zoulas wrote: >> I ported OpenBSD's static pie support to x86. Here's what it looks like. >> I left some debugging stuff in the csu Makefile that needs cleanup? >> Opinions? Should I add it? > >I really dislike how this is implemented.
How would you do it otherwise with minimal disruption? In summary the implementation keeps an _DYNAMIC entry in the static binary, and adds new crt0 code (mcrt0 for profiling and rcrt0 for non) to do the relocations on startup (like a minimal ld.so). christos