Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Re: MIPS GOT overflow in gcc 3.2.
       [not found] <20020701184640.A2043@lucon.org>
@ 2002-07-02  2:07 ` Eric Christopher
  2002-07-02  3:09   ` Eric Christopher
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Christopher @ 2002-07-02  2:07 UTC (permalink / raw)
  To: H. J. Lu; +Cc: linux-mips, GNU C Library, binutils


> For gcc 3.1.1, I got
> 
>   [17] .got              PROGBITS        0068b8a0 64b8a0 00ff90 04 WAp  0   0
>   16
> 
> 0x00ff90 is very close to 64K. I thought it would only happen to KDE.

AFAIK it happens to mozilla as well.

Guh.

-eric

-- 
I will not carve gods

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MIPS GOT overflow in gcc 3.2.
  2002-07-02  2:07 ` MIPS GOT overflow in gcc 3.2 Eric Christopher
@ 2002-07-02  3:09   ` Eric Christopher
  2002-07-02  6:58     ` H. J. Lu
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Eric Christopher @ 2002-07-02  3:09 UTC (permalink / raw)
  To: Eric Christopher; +Cc: H. J. Lu, linux-mips, GNU C Library, binutils


> AFAIK it happens to mozilla as well.
> 
> Guh.

There are a few different possible solutions, one is to do the
-fPIC/-fpic split, another is to copy to SGI multigot, I'm sure there
are other solutions as well...

-eric

-- 
I will not carve gods

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MIPS GOT overflow in gcc 3.2.
  2002-07-02  3:09   ` Eric Christopher
@ 2002-07-02  6:58     ` H. J. Lu
  2002-07-02 18:48     ` Greg Lindahl
  2002-07-03 16:35     ` RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.) H. J. Lu
  2 siblings, 0 replies; 10+ messages in thread
From: H. J. Lu @ 2002-07-02  6:58 UTC (permalink / raw)
  To: Eric Christopher; +Cc: linux-mips, GNU C Library, binutils

On Mon, Jul 01, 2002 at 08:09:59PM -0700, Eric Christopher wrote:
> 
> > AFAIK it happens to mozilla as well.
> > 
> > Guh.
> 
> There are a few different possible solutions, one is to do the
> -fPIC/-fpic split, another is to copy to SGI multigot, I'm sure there
> are other solutions as well...
> 

I am testing this patch now. It will take a day to verify it.


H.J.
----
2002-07-02  H.J. Lu <hjl@gnu.org>

	* ltcf-gcj.sh (ac_cv_prog_cc_pic): Add "-Wa,-xgot" for
	Linux/mips.

--- ltcf-gcj.sh.xgot	Mon Sep 10 08:39:17 2001
+++ ltcf-gcj.sh	Mon Jul  1 23:49:06 2002
@@ -639,6 +639,14 @@ fi
 	 ac_cv_prog_cc_pic=-Kconform_pic
       fi
       ;;
+    linux*) 
+      ac_cv_prog_cc_pic='-fPIC'
+      case $host_cpu in
+      mips*)  
+	ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -Wa,-xgot"
+	;;      
+      esac
+      ;;      
     *)
       ac_cv_prog_cc_pic='-fPIC'
       ;;

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MIPS GOT overflow in gcc 3.2.
  2002-07-02  3:09   ` Eric Christopher
  2002-07-02  6:58     ` H. J. Lu
@ 2002-07-02 18:48     ` Greg Lindahl
  2002-07-02 18:55       ` H. J. Lu
  2002-07-03 16:35     ` RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.) H. J. Lu
  2 siblings, 1 reply; 10+ messages in thread
From: Greg Lindahl @ 2002-07-02 18:48 UTC (permalink / raw)
  To: linux-mips

> AFAIK it happens to mozilla as well.

On AlphaLinux, we eventually acquired multigot. Many large apps were
tripping on this problem; many big C++ programs essentially use
whole-program compilation, and many HPC codes link a bazillion large
libraries. I don't understand if -fpic or -fPIC are as good of a
solution as multigot.

greg

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MIPS GOT overflow in gcc 3.2.
  2002-07-02 18:48     ` Greg Lindahl
@ 2002-07-02 18:55       ` H. J. Lu
  2002-07-02 18:58         ` Daniel Jacobowitz
  0 siblings, 1 reply; 10+ messages in thread
From: H. J. Lu @ 2002-07-02 18:55 UTC (permalink / raw)
  To: Greg Lindahl; +Cc: linux-mips

On Tue, Jul 02, 2002 at 11:48:43AM -0700, Greg Lindahl wrote:
> > AFAIK it happens to mozilla as well.
> 
> On AlphaLinux, we eventually acquired multigot. Many large apps were
> tripping on this problem; many big C++ programs essentially use
> whole-program compilation, and many HPC codes link a bazillion large
> libraries. I don't understand if -fpic or -fPIC are as good of a
> solution as multigot.

FYI, it is -Wa,-xgot, not -fPIC. multigot may be better. But it is not
supported on mips. Until someone adds it, it is not an option.


H.J.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MIPS GOT overflow in gcc 3.2.
  2002-07-02 18:55       ` H. J. Lu
@ 2002-07-02 18:58         ` Daniel Jacobowitz
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2002-07-02 18:58 UTC (permalink / raw)
  To: H. J. Lu; +Cc: Greg Lindahl, linux-mips

On Tue, Jul 02, 2002 at 11:55:25AM -0700, H. J. Lu wrote:
> On Tue, Jul 02, 2002 at 11:48:43AM -0700, Greg Lindahl wrote:
> > > AFAIK it happens to mozilla as well.
> > 
> > On AlphaLinux, we eventually acquired multigot. Many large apps were
> > tripping on this problem; many big C++ programs essentially use
> > whole-program compilation, and many HPC codes link a bazillion large
> > libraries. I don't understand if -fpic or -fPIC are as good of a
> > solution as multigot.
> 
> FYI, it is -Wa,-xgot, not -fPIC. multigot may be better. But it is not
> supported on mips. Until someone adds it, it is not an option.

No, it's the difference between -fpic and -fPIC.  Also not yet
implemented.  I intend to implement multigot in a couple of months if
no one else bothers to first.

You can not link modules with different GOT models together last I
checked, HJ.  That means that if any static code from libgcc is used in
libjava you'll lose badly with -Wa,-xgot.  Ditto libc_nonshared.a.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.)
  2002-07-02  3:09   ` Eric Christopher
  2002-07-02  6:58     ` H. J. Lu
  2002-07-02 18:48     ` Greg Lindahl
@ 2002-07-03 16:35     ` H. J. Lu
  2002-07-03 16:40       ` Daniel Jacobowitz
  2 siblings, 1 reply; 10+ messages in thread
From: H. J. Lu @ 2002-07-03 16:35 UTC (permalink / raw)
  To: Eric Christopher; +Cc: linux-mips, GNU C Library, binutils, gcc

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

On Mon, Jul 01, 2002 at 08:09:59PM -0700, Eric Christopher wrote:
> 
> > AFAIK it happens to mozilla as well.
> > 
> > Guh.
> 
> There are a few different possible solutions, one is to do the
> -fPIC/-fpic split, another is to copy to SGI multigot, I'm sure there
> are other solutions as well...
> 

I am enclosing a kludge here. With that, I got

http://gcc.gnu.org/ml/gcc-testresults/2002-07/msg00062.html

Any comments?


H.J.

[-- Attachment #2: libjava-xgot.patch --]
[-- Type: text/plain, Size: 1429 bytes --]

2002-07-02  H.J. Lu <hjl@gnu.org>

	* ltcf-c.sh (ac_cv_prog_cc_pic): Add "-Wa,-xgot" for
	Linux/mips.
	* ltcf-cxx.sh (ac_cv_prog_cc_pic): Likewise.
	* ltcf-gcj.sh (ac_cv_prog_cc_pic): Likewise.

--- gcc/ltcf-c.sh.xgot	Mon Sep 10 08:39:17 2001
+++ gcc/ltcf-c.sh	Tue Jul  2 00:06:54 2002
@@ -672,6 +672,14 @@ else
 	 ac_cv_prog_cc_pic=-Kconform_pic
       fi
       ;;
+    linux*) 
+      ac_cv_prog_cc_pic='-fPIC'
+      case "$host_cpu" in
+      mips*)  
+	ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -Wa,-xgot"
+	;;      
+      esac
+      ;;      
     *)
       ac_cv_prog_cc_pic='-fPIC'
       ;;
--- gcc/ltcf-cxx.sh.xgot	Mon Sep 10 08:39:17 2001
+++ gcc/ltcf-cxx.sh	Tue Jul  2 13:40:41 2002
@@ -707,6 +707,14 @@ if test "$with_gcc" = yes; then
       ac_cv_prog_cc_pic=-Kconform_pic
     fi
     ;;
+  linux*) 
+    ac_cv_prog_cc_pic='-fPIC'
+    case "$host_cpu" in
+    mips*)  
+      ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -Wa,-xgot"
+      ;;      
+    esac
+    ;;      
   *)
     ac_cv_prog_cc_pic='-fPIC'
     ;;
--- gcc/ltcf-gcj.sh.xgot	Mon Sep 10 08:39:17 2001
+++ gcc/ltcf-gcj.sh	Mon Jul  1 23:49:06 2002
@@ -639,6 +639,14 @@ fi
 	 ac_cv_prog_cc_pic=-Kconform_pic
       fi
       ;;
+    linux*) 
+      ac_cv_prog_cc_pic='-fPIC'
+      case "$host_cpu" in
+      mips*)  
+	ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -Wa,-xgot"
+	;;      
+      esac
+      ;;      
     *)
       ac_cv_prog_cc_pic='-fPIC'
       ;;

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.)
  2002-07-03 16:35     ` RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.) H. J. Lu
@ 2002-07-03 16:40       ` Daniel Jacobowitz
  2002-07-03 16:50         ` H. J. Lu
  2002-07-03 23:02         ` Ralf Baechle
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2002-07-03 16:40 UTC (permalink / raw)
  To: H. J. Lu; +Cc: Eric Christopher, linux-mips, GNU C Library, binutils, gcc

On Wed, Jul 03, 2002 at 09:35:18AM -0700, H. J. Lu wrote:
> On Mon, Jul 01, 2002 at 08:09:59PM -0700, Eric Christopher wrote:
> > 
> > > AFAIK it happens to mozilla as well.
> > > 
> > > Guh.
> > 
> > There are a few different possible solutions, one is to do the
> > -fPIC/-fpic split, another is to copy to SGI multigot, I'm sure there
> > are other solutions as well...
> > 
> 
> I am enclosing a kludge here. With that, I got
> 
> http://gcc.gnu.org/ml/gcc-testresults/2002-07/msg00062.html
> 
> Any comments?

Did you see my message about mixing GOT models?  I'd need Ralf or Eric to
confirm this, but I'm pretty sure there's a lot of luck involved in
your workaround.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.)
  2002-07-03 16:40       ` Daniel Jacobowitz
@ 2002-07-03 16:50         ` H. J. Lu
  2002-07-03 23:02         ` Ralf Baechle
  1 sibling, 0 replies; 10+ messages in thread
From: H. J. Lu @ 2002-07-03 16:50 UTC (permalink / raw)
  To: Eric Christopher, linux-mips, GNU C Library, binutils, gcc

On Wed, Jul 03, 2002 at 12:40:39PM -0400, Daniel Jacobowitz wrote:
> On Wed, Jul 03, 2002 at 09:35:18AM -0700, H. J. Lu wrote:
> > On Mon, Jul 01, 2002 at 08:09:59PM -0700, Eric Christopher wrote:
> > > 
> > > > AFAIK it happens to mozilla as well.
> > > > 
> > > > Guh.
> > > 
> > > There are a few different possible solutions, one is to do the
> > > -fPIC/-fpic split, another is to copy to SGI multigot, I'm sure there
> > > are other solutions as well...
> > > 
> > 
> > I am enclosing a kludge here. With that, I got
> > 
> > http://gcc.gnu.org/ml/gcc-testresults/2002-07/msg00062.html
> > 
> > Any comments?
> 
> Did you see my message about mixing GOT models?  I'd need Ralf or Eric to

A testcase?


H.J.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.)
  2002-07-03 16:40       ` Daniel Jacobowitz
  2002-07-03 16:50         ` H. J. Lu
@ 2002-07-03 23:02         ` Ralf Baechle
  1 sibling, 0 replies; 10+ messages in thread
From: Ralf Baechle @ 2002-07-03 23:02 UTC (permalink / raw)
  To: Daniel Jacobowitz
  Cc: H. J. Lu, Eric Christopher, linux-mips, GNU C Library, binutils,
	gcc

On Wed, Jul 03, 2002 at 12:40:39PM -0400, Daniel Jacobowitz wrote:

> Did you see my message about mixing GOT models?  I'd need Ralf or Eric to
> confirm this, but I'm pretty sure there's a lot of luck involved in
> your workaround.

I've not seen your posting but yes, due to other static objects involved
into linking there definately is luck involved.

  Ralf

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-07-03 22:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20020701184640.A2043@lucon.org>
2002-07-02  2:07 ` MIPS GOT overflow in gcc 3.2 Eric Christopher
2002-07-02  3:09   ` Eric Christopher
2002-07-02  6:58     ` H. J. Lu
2002-07-02 18:48     ` Greg Lindahl
2002-07-02 18:55       ` H. J. Lu
2002-07-02 18:58         ` Daniel Jacobowitz
2002-07-03 16:35     ` RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.) H. J. Lu
2002-07-03 16:40       ` Daniel Jacobowitz
2002-07-03 16:50         ` H. J. Lu
2002-07-03 23:02         ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox