Re: about -fpic/-fPIC option for gcc

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

 



Lin George <george4academic@xxxxxxxxx> writes:

> Could you provide a little more information please? I
> mean what is the different things generated by -fpic
> and -fPIC in a shared library?

To make the code position independent and to permit the executable to
override symbols defined in the shared library, all global variables
are accessed via a table of addresses (the Global Offset Table, or
GOT) and all functions are called via a table of branches (the
Procedure Linkage Table, or PLT).  The dynamic linker initializes the
GOT and PLT at runtime.  The precise details depend on the platform.

Ian

[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