Re: PIC is wasteful

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

 



On Fri, 24 Jun 2011, Agner Fog wrote:

On 23-06-2011 22:02, Marc Glisse wrote:
On Thu, 23 Jun 2011, Ian Lance Taylor wrote:

Agner Fog <agner@xxxxxxxxx> writes:

I wonder why position-independent code (PIC) and global offset tables
(GOT) are used in shared objects (.so) when these features are wasting
resources and apparently unnecessary. The wasteful use of PIC and GOT
in Linux is apparent in the following questions:

Do you mean you would like -Bsymbolic to be the default ? (or maybe Solaris' -Bdirect)

Thanks for the tip about -Bsymbolic, that's what I want, but it doesn't seem to do the job.
When I compile with -Bsymbolic -fpic I still get a GOT entry in 64 bit mode.

I just tried (linux amd64) on a trivial lib with 2 functions where the second calls the first. And -Bsymbolic made the entry for the first function disappear from the .rela.plt section. So it makes some difference at least.

--
Marc Glisse


[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