and pie

Lars Müller lmuelle at
Sat Jun 25 14:17:31 GMT 2005

On Sat, Jun 25, 2005 at 09:21:49AM +0200, Stefan (metze) Metzmacher wrote:
> btw, what does this gane us?
> from man gcc-4.0 I can't really understand what -fpie does compaired to -fPIC
> I just read something that this objects can only be used for linking in executables,
> (I'm not shure if I understand that correct...) but I don't see the point to use it.

It results in Position Independent Executables.  Attackers no longer can
rely on the offset of the executeable code in the binary.

and the last section of for further

> Note in samba 4 we compile always with -fPIC (for executables and modules)
> that avoids to recompile everything with other compilerflags again.
> (btw: that was tridges idea)

PIC and pie don't differ much from the resulting code IIRC.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the samba-technical mailing list