This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] Add -static-pie to GCC driver to create static PIE


On Tue, Aug 8, 2017 at 10:36 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On August 9, 2017 12:18:41 AM GMT+02:00, "H.J. Lu" <hongjiu.lu@intel.com> wrote:
>>This patch adds -static-pie to GCC driver to create static PIE.  A
>>static
>>position independent executable (PIE) is similar to static executable,
>>but can be loaded at any address without a dynamic linker.  All linker
>>input files must be compiled with -fpie or -fPIE and linker must
>>support
>>--no-dynamic-linker to avoid linking with dynamic linker.  "-z text" is
>>also needed to prevent dynamic relocations in read-only segments.
>>
>>OK for trunk?
>
> What's wrong with -static -pie?
>

-static -pie behaved differently depending on if --enable-default-pie
was used:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81523

I just checked in a patch to make -static always  override -pie.


-- 
H.J.


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