This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch ob] Disallow -pie and -static


Mike Frysinger <vapier@gentoo.org> writes:

>> For example: should the linker create a PT_INTERP segment for -static
>> -pie?
>
> being a PIE and dynamic/static linking are orthogonal issues imo.

Conceptually, sure.  Implementation-wise, no.


> if an ELF 
> is linked with -static, then there's no ldso and thus no PT_INTERP needed.

And then, on current GNU/Linux systems, it is not a PIE.


> i don't see why -pie should require PT_DYNAMIC or PT_INTERP.

Because without PT_DYNAMIC and PT_INTERP, on current GNU/Linux systems,
the executable won't work.


You seem to be speaking at some sort of conceptual level.  At the
conceptual level, you are correct.  It is possible to define some sort
of static PIE.  But there is no such thing today, and implementing it
will require changes to the linker.  When it is implemented, we will
change the linker such that -pie -static is not an error.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]