why does -fno-pic coge generation on x64 require the large model?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm experimenting with generating PIC and non-PIC code on x64 Ubuntu.
It's possible to generate non PIC code as follows:

  gcc -fno-PIC -mcmodel=large -shared -c file.c

However, I noticed that for other models (i.e. -mcmodel=small, or by
default, without the -mcmodel argument), the code being generated is
not really suitable for PIC as it has problematic load-time
relocations.

My question is - why is the large model required to generate true PIC code?

Thanks in advance,
Eli


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux