-fPIC changes sizeof class
Alan M. Carroll
amc@network-geographics.com
Mon Aug 10 13:47:00 GMT 2009
At 04:05 AM 8/10/2009, Andrew Haley wrote:
>> According to the documentation[1] this flag shouldn't have any
>> effect at all because I am building for 64 bit Intel.
>
>I can't find that reference. Can you please quote the section to
>which you are referring?
http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Code-Gen-Options.html#Code-Gen-Options
-fPIC
If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table. This option makes a difference on the m68k, PowerPC and SPARC.
Position-independent code requires special support, and therefore works only on certain machines.
When this flag is set, the macros __pic__ and __PIC__ are defined to 2.
>I can't see why the size of a class should change.
Is the behavior sufficiently anomalous that it would be worth generating a smaller example?
More information about the Gcc-help
mailing list