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 17:34:33 +0100
Cc: linux-mips@oss.sgi.com
In-reply-to: <200202251516.QAA22570@copsun18.mips.com>; from hartvige@mips.com on Mon, Feb 25, 2002 at 04:16:20PM +0100
References: <200202251516.QAA22570@copsun18.mips.com>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
On Mon, Feb 25, 2002 at 04:16:20PM +0100, Hartvig Ekner wrote:

>         .globl ENTRY_POINT
>         .type ENTRY_POINT,@function
> ENTRY_POINT:
> #ifdef __PIC__
>         SET_GP
> #else
>         la  $28, _gp
> #endif
> 
> Makes things work (this code ends in crt1.o). Is this the right place to 
> fix it?

Non-PIC code doesn't use $gp, so any reference to $gp is a bug.  Note
that we don't support global data optimization for ELF either that is,
-G 0 is the default.

  Ralf

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