Broken PIC support in OS X

Marc Glisse marc.glisse at inria.fr
Sat Aug 6 18:50:33 CEST 2011


On Sat, 6 Aug 2011, Torbjorn Granlund wrote:

> Manuel M T Chakravarty <chak at cse.unsw.edu.au> writes:
>
>  The problem that I see with this policy for OS X 10.7 is that a non
>  PIC library prevents the creation of a PIE executable, which in turn
>  prevents address space layout randomisation.  AFAIK this is the reason
>  why Apple discourages non PIC code on this platform and made PIC the
>  default.
>
> I suppose people that worry about these issues should simply stick to
> the "dylib" variant of the created library.
>
>  The --disable-shared configure option doesn't seem to make a difference:
>
> Sorry, I meant to say --disable-static.  (--disable-shared disables
> compilation of the shared lib, --disable-static disables compilation of
> the non-shared, aka static, lib.)

./configure -h advertises --with-pic, which may be confusing.

-- 
Marc Glisse


More information about the gmp-bugs mailing list