On Wed, 30 Nov 2005, Mike Frysinger wrote:

PIE and PIC arent the same thing

-fPIC is for creating position independent code for shared objects
while -fPIE is for creating position independent code for executables

Right, I did know that ;).

The distinction between the two is mostly important at link-time. Ie a collection of PIC and/or PIE objects can be linked together into a PIE executable.

What I'm curious about is what the difference is in generated /code/ for an object /before/ linking done between PIC and PIE. Is there an efficiency/performance gain in generating PIE code over PIC? If so, is the gain over PIC sufficiently large to be relevant to Ralf's patch (which, if I understand correctly, will compile all code as PIC if -fpie is supplied).

If efficiency of PIE targeted code is sufficiently greater than PIC, then, AIUI, that would require libtool to distinguish between additional modes of compiling objects intended for shared usage (PIC) and not (PIE).

Is my understanding anyway.

Alternatively, projects would need to tailor their build systems to make the distinction between possibly-intended-to-link-into-shared and other ojbects.

regards,
--
Paul Jakma      [EMAIL PROTECTED]       [EMAIL PROTECTED]       Key ID: 64A2FF6A
Fortune:
When the speaker and he to whom he is speaks do not understand, that is
metaphysics.
                -- Voltaire


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to