public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* MIPS GOT overflow in gcc 3.2.
@ 2002-07-01 18:46 H. J. Lu
  2002-07-01 19:08 ` Eric Christopher
  0 siblings, 1 reply; 8+ messages in thread
From: H. J. Lu @ 2002-07-01 18:46 UTC (permalink / raw)
  To: Eric Christopher; +Cc: linux-mips, GNU C Library, binutils

On Mon, Jul 01, 2002 at 06:29:24PM -0700, H. J. Lu wrote:
> 
> libjava failed to build. I got so many
> 
> .libs/prims.o: In function `_Jv_ThrowBadArrayIndex':
> /home/hjl/work/gnu/src/gcc/gcc/libjava/prims.cc:313: relocation truncated to
> fit: R_MIPS_GOT16 java::lang::ArrayIndexOutOfBoundsException::class$
> .libs/prims.o: In function `_Jv_ThisExecutable(char const*)':
> /home/hjl/work/gnu/src/gcc/gcc/libjava/prims.cc:722: relocation truncated to
> fit: R_MIPS_CALL16 strcpy
> .libs/jni.o: In function `mangled_name':
> /home/hjl/work/gnu/src/gcc/gcc/libjava/gcj/cni.h:70: relocation truncated to
> fit: R_MIPS_CALL16 java::lang::Class::getName()
> .libs/jni.o: In function `mangled_name':
> :50: relocation truncated to fit: R_MIPS_CALL16 java::lang::Class::getName()
> 
> I don't know if it is due to GOT overflow or something else. gcc 3.1.1
> builds fine.
> 

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.



H.J.

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

* Re: MIPS GOT overflow in gcc 3.2.
  2002-07-01 18:46 MIPS GOT overflow in gcc 3.2 H. J. Lu
@ 2002-07-01 19:08 ` Eric Christopher
  2002-07-01 20:11   ` Eric Christopher
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Christopher @ 2002-07-01 19:08 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] 8+ messages in thread

* Re: MIPS GOT overflow in gcc 3.2.
  2002-07-01 19:08 ` Eric Christopher
@ 2002-07-01 20:11   ` Eric Christopher
  2002-07-01 23:58     ` H. J. Lu
  2002-07-03  9:40     ` RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.) H. J. Lu
  0 siblings, 2 replies; 8+ messages in thread
From: Eric Christopher @ 2002-07-01 20:11 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] 8+ messages in thread

* Re: MIPS GOT overflow in gcc 3.2.
  2002-07-01 20:11   ` Eric Christopher
@ 2002-07-01 23:58     ` H. J. Lu
  2002-07-03  9:40     ` RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.) H. J. Lu
  1 sibling, 0 replies; 8+ messages in thread
From: H. J. Lu @ 2002-07-01 23: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] 8+ messages in thread

* RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.)
  2002-07-01 20:11   ` Eric Christopher
  2002-07-01 23:58     ` H. J. Lu
@ 2002-07-03  9:40     ` H. J. Lu
  2002-07-03  9:50       ` Daniel Jacobowitz
  1 sibling, 1 reply; 8+ messages in thread
From: H. J. Lu @ 2002-07-03  9:40 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] 8+ messages in thread

* Re: RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.)
  2002-07-03  9:40     ` RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.) H. J. Lu
@ 2002-07-03  9:50       ` Daniel Jacobowitz
  2002-07-03 10:16         ` H. J. Lu
  2002-07-03 16:15         ` Ralf Baechle
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-07-03  9:50 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] 8+ messages in thread

* Re: RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.)
  2002-07-03  9:50       ` Daniel Jacobowitz
@ 2002-07-03 10:16         ` H. J. Lu
  2002-07-03 16:15         ` Ralf Baechle
  1 sibling, 0 replies; 8+ messages in thread
From: H. J. Lu @ 2002-07-03 10:16 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] 8+ messages in thread

* Re: RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.)
  2002-07-03  9:50       ` Daniel Jacobowitz
  2002-07-03 10:16         ` H. J. Lu
@ 2002-07-03 16:15         ` Ralf Baechle
  1 sibling, 0 replies; 8+ messages in thread
From: Ralf Baechle @ 2002-07-03 16:15 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] 8+ messages in thread

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-01 18:46 MIPS GOT overflow in gcc 3.2 H. J. Lu
2002-07-01 19:08 ` Eric Christopher
2002-07-01 20:11   ` Eric Christopher
2002-07-01 23:58     ` H. J. Lu
2002-07-03  9:40     ` RFC: Use -Wa,-xgot for Linux/mips (Re: MIPS GOT overflow in gcc 3.2.) H. J. Lu
2002-07-03  9:50       ` Daniel Jacobowitz
2002-07-03 10:16         ` H. J. Lu
2002-07-03 16:15         ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).