Page 1 of 1

relocation of static library

Posted: Fri May 23, 2008 5:43 am
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)

Posted: Fri May 23, 2008 10:02 pm
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*