linux-mips
[Top] [All Lists]

Re: Setting up of GP in static, non-PIC version of glibc?

To: Hartvig Ekner <hartvige@mips.com>
Subject: Re: Setting up of GP in static, non-PIC version of glibc?
From: Ralf Baechle <ralf@oss.sgi.com>
Date: Mon, 25 Feb 2002 21:23:58 +0100
Cc: Johannes Stezenbach <js@convergence.de>, linux-mips@oss.sgi.com
In-reply-to: <200202251921.UAA27344@copsun18.mips.com>; from hartvige@mips.com on Mon, Feb 25, 2002 at 08:21:00PM +0100
References: <20020225193928.A4385@dea.linux-mips.net> <200202251921.UAA27344@copsun18.mips.com>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
On Mon, Feb 25, 2002 at 08:21:00PM +0100, Hartvig Ekner wrote:

> > > BTW: Who is "we"? Do you mean global data optimization is broken
> > > in gcc/binutils or just that no one at SGI is using it?
> > 
> > It's an ECOFF specific optimization that just has been forward ported into
> > the ELF world.  And what does this have to do with SGI anyway?
> 
> I still don't get it. Why would one not use GP optimization with non-shared
> non-PIC code? It certainly is used throughout in the non-Linux MIPS world,
> and on the limited testing I did today it also worked fine. Is there 
> something which is known not to work, or some conflict somewhere which
> prevents the general use of GP?

I thought gcc would would for no good reason plain refuse to use global
pointer optimization with ELF - but I was wrong, just tested it again.
I also noticed that older gcc would emit initialized data to .data with
-G even though small data should go to .sdata.

Won't work by just enabeling for the kernel though.  The kernel has it's
own idea of how to use the $gp register.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>