configure.in and pie

Lars Müller lmuelle at samba.org
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.

See
http://www.linuxfromscratch.org/hlfs/view/unstable/uclibc/chapter02/pie.html
and the last section of
http://en.wikipedia.org/wiki/Position_independent_code for further
details.

> 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.

Lars
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20050625/ba379334/attachment.bin


More information about the samba-technical mailing list