* Undefined symbol '_GLOBAL_OFFSET_TABLE_' with custom GCC port
@ 2007-12-08 21:14 Robert Norris
2007-12-09 11:21 ` Rask Ingemann Lambertsen
0 siblings, 1 reply; 3+ messages in thread
From: Robert Norris @ 2007-12-08 21:14 UTC (permalink / raw)
To: gcc-help
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Undefined symbol '_GLOBAL_OFFSET_TABLE_' with custom GCC port
2007-12-08 21:14 Undefined symbol '_GLOBAL_OFFSET_TABLE_' with custom GCC port Robert Norris
@ 2007-12-09 11:21 ` Rask Ingemann Lambertsen
2007-12-10 3:18 ` Robert Norris
0 siblings, 1 reply; 3+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-12-09 11:21 UTC (permalink / raw)
To: Robert Norris; +Cc: gcc-help
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Undefined symbol '_GLOBAL_OFFSET_TABLE_' with custom GCC port
2007-12-09 11:21 ` Rask Ingemann Lambertsen
@ 2007-12-10 3:18 ` Robert Norris
0 siblings, 0 replies; 3+ messages in thread
From: Robert Norris @ 2007-12-10 3:18 UTC (permalink / raw)
To: gcc-help
> 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.
That makes sense. We have a custom ld script because our binary format
is somewhat unusual.
I have enough info to proceed from here. Thanks :)
Rob.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-10 3:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-08 21:14 Undefined symbol '_GLOBAL_OFFSET_TABLE_' with custom GCC port Robert Norris
2007-12-09 11:21 ` Rask Ingemann Lambertsen
2007-12-10 3:18 ` Robert Norris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).