Undefined symbol '_GLOBAL_OFFSET_TABLE_' with custom GCC port
Rask Ingemann Lambertsen
rask@sygehus.dk
Sun Dec 9 11:21:00 GMT 2007
On Sun, Dec 09, 2007 at 08:12:27AM +1100, Robert Norris wrote:
> 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.
It is provided by the linker. Look at the binutils linker scripts to see
how. There is also the possibility that GCC shouldn't be referencing the
symbol. I can't tell from your description.
--
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year
More information about the Gcc-help
mailing list