This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Undefined symbol '_GLOBAL_OFFSET_TABLE_' with custom GCC port
- From: Robert Norris <rob at cataclysm dot cx>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 9 Dec 2007 08:12:27 +1100
- Subject: Undefined symbol '_GLOBAL_OFFSET_TABLE_' with custom GCC port
I'm using GCC 4.2.2 ported to AROS (i386), a system that does not have
ELF-style shared libraries.
Now I'm compiling a library that wants to compile with -fPIC and for
various reasons I can't easily turn that off. I can successfully produce
a static (.a) library.
When trying to link something with this library, the link fails as the
symbol '_GLOBAL_OFFSET_TABLE_' is not defined.
I understand what this symbol is for, but I don't see how to arrange for
it be included. Its very difficult to find information about it, but as
far as I can tell gcc/libgcc provides it. My guess is that when our GCC
port was originally done this was disabled/not enabled because we don't
have shared libraries.
I'm having a hard time seeing where and how this all works. Any guidance
you could give would be greatly appreciated.
Cheers,
Rob.