RFC: Patch to fix MIPS -mno-shared with multi-got...
Daniel Jacobowitz
drow@false.org
Fri Mar 4 00:41:00 GMT 2005
On Fri, Mar 04, 2005 at 12:27:29AM +0100, Thiemo Seufer wrote:
> David Daney wrote:
> > But it is possible to have C code like this:
> >
> > extern int _gp;
> >
> >
> > int
> > foo()
> > {
> > int *bar = &_gp;
> > /* Do something with the primary GOT */
> > }
> >
> > In this case the existing semantics are clear. It is the primary GOT.
>
> Whithout having looked it up, I doubt the ABI gives the program any
> guarantee about the contents of the GOT.
I know at least one dynamic linker that works this way. Of course, it
uses the symbol _GLOBAL_OFFSET_TABLE_ for consistency with other
platforms, so it won't be directly affected; but there may be others.
--
Daniel Jacobowitz
CodeSourcery, LLC
More information about the Binutils
mailing list