relocation of static library

Programming, for all ages and all languages.
Post Reply
User avatar
mcheung63
Member
Member
Posts: 175
Joined: Thu Jun 22, 2006 8:33 am
Location: Hong Kong
Contact:

relocation of static library

Post by mcheung63 »

Hi all
Why the .a (static library) still need a .got (global offset
table) session?
I think the static library will linked to the target, all the global
variable will have a place to live in, why need relocation?

thanks
from Peter (cmk128@hotmail)
User avatar
kmcguire
Member
Member
Posts: 120
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Post by kmcguire »

I can see no reason why there should be a global offset table emitted during compilation of a static library using GCC. It will be emitted for a shared library. What flags are you using during compilation and packaging of the library? *curious*
Post Reply