This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Undefined symbol '_GLOBAL_OFFSET_TABLE_' with custom GCC port
- From: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- To: Robert Norris <rob at cataclysm dot cx>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 9 Dec 2007 12:21:13 +0100
- Subject: Re: Undefined symbol '_GLOBAL_OFFSET_TABLE_' with custom GCC port
- References: <20071208211227.GA8865@plastic.home>
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