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: PR ld/16428: Disallow -shared/-pie, -shared/-static, -pie/-static


On Tue, Jan 14, 2014 at 11:09:45AM +1030, Alan Modra wrote:
> I see no reason why "-static -pie" should not work.  "-static" does
> *not* specify the type of output directly.  "-static" chooses input
> objects.  "-pie" affects output.  The two options are logically
> orthogonal.  You ought to be able to build a PIE that doesn't use any
> shared libraries!  If it doesn't work, then we have a bug elsewhere.

I guess I should qualify this comment a little.  I was talking about
linker operation, not what might happen in practice when you use
"-static -pie".  In practice, the archive libraries for -lc and so on
probably won't be compiled as PIC, and other toolchain and library
packaging issues may well prevent this working.  My point is the
linker itself should be able to support "-static -pie".

-- 
Alan Modra
Australia Development Lab, IBM


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