This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Patch to fix MIPS -mno-shared with multi-got...


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]