Page 1 of 1
_GLOBAL_OFFSET_TABLE_
Posted: Tue Feb 05, 2008 4:22 am
by mcheung63
Hi All
the linker said i am missing _GLOBAL_OFFSET_TABLE_, how to define it? what is it's struct{} look like?
thanks
from Peter (
[email protected])
Posted: Tue Feb 05, 2008 5:12 am
by Solar
_GLOBAL_OFFSET_TABLE_ is a matter of the toolchain, i.e. it's not up to you to define it, it is defined by the compiler, if you use the right command line options.
Without knowing specifics, it's hard to tell what you should do different to get that table (or remove references to it).
Posted: Tue Feb 05, 2008 8:33 am
by mcheung63
the ld linker said i have a undefined reference : _GLOBAL_OFFSET_TABLE_
I think i need to define one in my code, but i don't know its type.
thanks
from Peter
Posted: Tue Feb 05, 2008 8:38 am
by AJ
Hi,
Can you post the exact linker output (in code tags)? What flags are you using? What flags are you using for your compiler? Do you get any compiler warnings? What compiler are you using (presumably GCC/GPP)?
Cheers,
Adam
Posted: Tue Feb 05, 2008 8:57 am
by Solar
mcheung63 wrote:I think i need to define one in my code...
I don't think so. As I said, _GLOBAL_OFFSET_TABLE_ is something internal to compiler and linker.
It would help to know which files are compiled / linked with which command line options, and what versions of compiler / linker are used (as AJ said). Most likely some command options are used unwisely.