[Top] [All Lists]

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

To: Hartvig Ekner <>
Subject: Re: Setting up of GP in static, non-PIC version of glibc?
From: Ralf Baechle <>
Date: Mon, 25 Feb 2002 21:23:58 +0100
Cc: Johannes Stezenbach <>,
In-reply-to: <>; from on Mon, Feb 25, 2002 at 08:21:00PM +0100
References: <> <>
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.


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