PATCH: PR ld/16428: Disallow -shared/-pie, -shared/-static, -pie/-static
Alan Modra
amodra@gmail.com
Tue Jan 14 09:39:00 GMT 2014
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
More information about the Binutils
mailing list