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: Pass -fpie to the Darwin linker


On Fri, Jun 01, 2007 at 03:57:05PM -0700, Geoffrey Keating wrote:
> 
> Pretty obvious.  I added the testcase because there doesn't seem to be
> any test that involves linking a PIE executable.
> 
> Bootstrapped and tested on powerpc-darwin8.  I also checked that GCC
> does try to pass -pie to the linker.

Not so obvious, at least it diverges from what is done on other OSes.
-fpie and -fPIE are compilation options like -fpic or -fPIC.
gcc -pie option (which is passed through to ld, see
LINK_PIE_SPEC) is a link option, similar to -shared.
Using -fpic on a command line doesn't imply -shared either.

	Jakub


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