on mips{,el} atexit.o should be compiled with -mxgot

Bug #8765 reported by Debian Bug Importer
6
Affects Status Importance Assigned to Milestone
glibc (Debian)
Fix Released
Unknown
glibc (Ubuntu)
Invalid
High
Unassigned

Bug Description

Automatically imported from Debian bug report #274738 http://bugs.debian.org/274738

Revision history for this message
In , Thiemo Seufer (ica2-ts) wrote : Re: Bug#274738: on mips{,el} atexit.o should be compiled with -mxgot

Matthias Klose wrote:
> Package: glibc
> Severity: serious
> Tags: sid
>
> current mainline libgcj fails to build on mips{,el}:
>
> /home/doko/gcc/gcc-snapshot-20041003/build/gcc/xgcc -shared-libgcc -B/home/doko/gcc/gcc-snapshot-20041003/build/gcc/ -nostdinc++ -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/bin/ -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/lib/ -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/include -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/sys-include -shared -nostdlib /usr/lib/crti.o /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtbeginS.o .libs/libgcj.la-2.o -Wl,--whole-archive ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a ./libltdl/.libs/libltdlc.a -Wl,--no-whole-archive -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libjava ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a -lpthread ./libltdl/.libs/libltdlc.a -ldl -lz -L/home/doko/gcc/gcc-snapshot-20041003/build/gcc -lgcc_s -lc -lgcc_s /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtendS.o /usr/lib/crtn.o -Wl,-soname -Wl,libgcj.so.6 -o .libs/libgcj.so.6.0.0
> /usr/lib/libc_nonshared.a(atexit.oS)(.text+0x38): In function `atexit':
> : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@@GLIBC_2.2
> collect2: ld returned 1 exit status
> make[2]: *** [libgcj.la] Error 1
>
> can be fixed by compiling glibc's atexit with -mxgot

This needs _two_ sets of those objects then, because a link employing
multigot will silently break over xgot objects.

> (at least that's the way mozilla succeeded to build).

Actually, no, mozilla uses the standard gcc/libc objects. It believe it
happens to work because those objects are linked in earlier, so their
GOT entry offset doesn't exceed the limit.

Thiemo

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #274738 http://bugs.debian.org/274738

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sun, 3 Oct 2004 23:54:01 +0200
From: Matthias Klose <email address hidden>
To: <email address hidden>
Subject: on mips{,el} atexit.o should be compiled with -mxgot

UGFja2FnZTogZ2xpYmMNClNldmVyaXR5OiBzZXJpb3VzDQpUYWdzOiBzaWQNCg0KY3VycmVu
dCBtYWlubGluZSBsaWJnY2ogZmFpbHMgdG8gYnVpbGQgb24gbWlwc3ssZWx9Og0KDQovaG9t
ZS9kb2tvL2djYy9nY2Mtc25hcHNob3QtMjAwNDEwMDMvYnVpbGQvZ2NjL3hnY2MgLXNoYXJl
ZC1saWJnY2MgLUIvaG9tZS9kb2tvL2djYy9nY2Mtc25hcHNob3QtMjAwNDEwMDMvYnVpbGQv
Z2NjLyAtbm9zdGRpbmMrKyAtTC9ob21lL2Rva28vZ2NjL2djYy1zbmFwc2hvdC0yMDA0MTAw
My9idWlsZC9taXBzZWwtbGludXgtZ251L2xpYnN0ZGMrKy12My9zcmMgLUwvaG9tZS9kb2tv
L2djYy9nY2Mtc25hcHNob3QtMjAwNDEwMDMvYnVpbGQvbWlwc2VsLWxpbnV4LWdudS9saWJz
dGRjKystdjMvc3JjLy5saWJzIC1CL3Vzci9saWIvZ2NjLXNuYXBzaG90L21pcHNlbC1saW51
eC1nbnUvYmluLyAtQi91c3IvbGliL2djYy1zbmFwc2hvdC9taXBzZWwtbGludXgtZ251L2xp
Yi8gLWlzeXN0ZW0gL3Vzci9saWIvZ2NjLXNuYXBzaG90L21pcHNlbC1saW51eC1nbnUvaW5j
bHVkZSAtaXN5c3RlbSAvdXNyL2xpYi9nY2Mtc25hcHNob3QvbWlwc2VsLWxpbnV4LWdudS9z
eXMtaW5jbHVkZSAtc2hhcmVkIC1ub3N0ZGxpYiAvdXNyL2xpYi9jcnRpLm8gL2hvbWUvZG9r
by9nY2MvZ2NjLXNuYXBzaG90LTIwMDQxMDAzL2J1aWxkL2djYy9jcnRiZWdpblMubyAubGli
cy9saWJnY2oubGEtMi5vIC1XbCwtLXdob2xlLWFyY2hpdmUgLi4vbGliZmZpLy5saWJzL2xp
YmZmaV9jb252ZW5pZW5jZS5hIC4uL2JvZWhtLWdjLy5saWJzL2xpYmdjamdjX2NvbnZlbmll
bmNlLmEgLi9saWJsdGRsLy5saWJzL2xpYmx0ZGxjLmEgLVdsLC0tbm8td2hvbGUtYXJjaGl2
ZSAgLUwvaG9tZS9kb2tvL2djYy9nY2Mtc25hcHNob3QtMjAwNDEwMDMvYnVpbGQvbWlwc2Vs
LWxpbnV4LWdudS9saWJzdGRjKystdjMvc3JjIC1ML2hvbWUvZG9rby9nY2MvZ2NjLXNuYXBz
aG90LTIwMDQxMDAzL2J1aWxkL21pcHNlbC1saW51eC1nbnUvbGlic3RkYysrLXYzL3NyYy8u
bGlicyAtTC9ob21lL2Rva28vZ2NjL2djYy1zbmFwc2hvdC0yMDA0MTAwMy9idWlsZC9taXBz
ZWwtbGludXgtZ251L2xpYmphdmEgLi4vbGliZmZpLy5saWJzL2xpYmZmaV9jb252ZW5pZW5j
ZS5hIC4uL2JvZWhtLWdjLy5saWJzL2xpYmdjamdjX2NvbnZlbmllbmNlLmEgLWxwdGhyZWFk
IC4vbGlibHRkbC8ubGlicy9saWJsdGRsYy5hIC1sZGwgLWx6IC1ML2hvbWUvZG9rby9nY2Mv
Z2NjLXNuYXBzaG90LTIwMDQxMDAzL2J1aWxkL2djYyAtbGdjY19zIC1sYyAtbGdjY19zICAg
IC9ob21lL2Rva28vZ2NjL2djYy1zbmFwc2hvdC0yMDA0MTAwMy9idWlsZC9nY2MvY3J0ZW5k
Uy5vIC91c3IvbGliL2NydG4ubyAgLVdsLC1zb25hbWUgLVdsLGxpYmdjai5zby42IC1vIC5s
aWJzL2xpYmdjai5zby42LjAuMA0KL3Vzci9saWIvbGliY19ub25zaGFyZWQuYShhdGV4aXQu
b1MpKC50ZXh0KzB4MzgpOiBJbiBmdW5jdGlvbiBgYXRleGl0JzoNCjogcmVsb2NhdGlvbiB0
cnVuY2F0ZWQgdG8gZml0OiBSX01JUFNfQ0FMTDE2IF9fY3hhX2F0ZXhpdEBAR0xJQkNfMi4y
DQpjb2xsZWN0MjogbGQgcmV0dXJuZWQgMSBleGl0IHN0YXR1cw0KbWFrZVsyXTogKioqIFts
aWJnY2oubGFdIEVycm9yIDENCg0KY2FuIGJlIGZpeGVkIGJ5IGNvbXBpbGluZyBnbGliYydz
IGF0ZXhpdCB3aXRoIC1teGdvdCAoYXQgbGVhc3QgdGhhdCdzDQp0aGUgd2F5IG1vemlsbGEg
c3VjY2VlZGVkIHRvIGJ1aWxkKS4=

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 4 Oct 2004 00:25:00 +0200
From: Thiemo Seufer <email address hidden>
To: Matthias Klose <email address hidden>, <email address hidden>
Subject: Re: Bug#274738: on mips{,el} atexit.o should be compiled with -mxgot

Matthias Klose wrote:
> Package: glibc
> Severity: serious
> Tags: sid
>=20
> current mainline libgcj fails to build on mips{,el}:
>=20
> /home/doko/gcc/gcc-snapshot-20041003/build/gcc/xgcc -shared-libgcc -B/hom=
e/doko/gcc/gcc-snapshot-20041003/build/gcc/ -nostdinc++ -L/home/doko/gcc/gc=
c-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gc=
c/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -B/us=
r/lib/gcc-snapshot/mipsel-linux-gnu/bin/ -B/usr/lib/gcc-snapshot/mipsel-lin=
ux-gnu/lib/ -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/include -isyste=
m /usr/lib/gcc-snapshot/mipsel-linux-gnu/sys-include -shared -nostdlib /usr=
/lib/crti.o /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtbeginS.o .lib=
s/libgcj.la-2.o -Wl,--whole-archive ../libffi/.libs/libffi_convenience.a ..=
/boehm-gc/.libs/libgcjgc_convenience.a ./libltdl/.libs/libltdlc.a -Wl,--no-=
whole-archive -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gn=
u/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linu=
x-gnu/libstdc++-v3/src/.libs -L/home/doko/gcc/gcc-snapshot-20041003/build/m=
ipsel-linux-gnu/libjava ../libffi/.libs/libffi_convenience.a ../boehm-gc/.l=
ibs/libgcjgc_convenience.a -lpthread ./libltdl/.libs/libltdlc.a -ldl -lz -L=
/home/doko/gcc/gcc-snapshot-20041003/build/gcc -lgcc_s -lc -lgcc_s /home=
/doko/gcc/gcc-snapshot-20041003/build/gcc/crtendS.o /usr/lib/crtn.o -Wl,-s=
oname -Wl,libgcj.so.6 -o .libs/libgcj.so.6.0.0
> /usr/lib/libc_nonshared.a(atexit.oS)(.text+0x38): In function `atexit':
> : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@@GLIBC_2.2
> collect2: ld returned 1 exit status
> make[2]: *** [libgcj.la] Error 1
>=20
> can be fixed by compiling glibc's atexit with -mxgot

This needs _two_ sets of those objects then, because a link employing
multigot will silently break over xgot objects.

> (at least that's the way mozilla succeeded to build).

Actually, no, mozilla uses the standard gcc/libc objects. It believe it
happens to work because those objects are linked in earlier, so their
GOT entry offset doesn't exceed the limit.

Thiemo

Revision history for this message
James Troup (elmo) wrote :

mipsen not a warty release arch

Revision history for this message
In , GOTO Masanori (gotom-debian) wrote :

At Mon, 4 Oct 2004 00:25:00 +0200,
Thiemo Seufer wrote:
> > current mainline libgcj fails to build on mips{,el}:
> >
> > /home/doko/gcc/gcc-snapshot-20041003/build/gcc/xgcc -shared-libgcc -B/home/doko/gcc/gcc-snapshot-20041003/build/gcc/ -nostdinc++ -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/bin/ -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/lib/ -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/include -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/sys-include -shared -nostdlib /usr/lib/crti.o /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtbeginS.o .libs/libgcj.la-2.o -Wl,--whole-archive ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a ./libltdl/.libs/libltdlc.a -Wl,--no-whole-archive -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-g
 nu/libjava ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a -lpthread ./libltdl/.libs/libltdlc.a -ldl -lz -L/home/doko/gcc/gcc-snapshot-20041003/build/gcc -lgcc_s -lc -lgcc_s /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtendS.o /usr/lib/crtn.o -Wl,-soname -Wl,libgcj.so.6 -o .libs/libgcj.so.6.0.0
> > /usr/lib/libc_nonshared.a(atexit.oS)(.text+0x38): In function `atexit':
> > : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@@GLIBC_2.2
> > collect2: ld returned 1 exit status
> > make[2]: *** [libgcj.la] Error 1
> >
> > can be fixed by compiling glibc's atexit with -mxgot
>
> This needs _two_ sets of those objects then, because a link employing
> multigot will silently break over xgot objects.

Does this problem come from glibc's compilation problem?

> > (at least that's the way mozilla succeeded to build).
>
> Actually, no, mozilla uses the standard gcc/libc objects. It believe it
> happens to work because those objects are linked in earlier, so their
> GOT entry offset doesn't exceed the limit.

Do you know what's the actual problem?

Regards,
-- gotom

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 05 Oct 2004 10:04:20 +0900
From: GOTO Masanori <email address hidden>
To: Thiemo Seufer <email address hidden>,
 <email address hidden>
Cc: Matthias Klose <email address hidden>
Subject: Re: Bug#274738: on mips{,el} atexit.o should be compiled with -mxgot

At Mon, 4 Oct 2004 00:25:00 +0200,
Thiemo Seufer wrote:
> > current mainline libgcj fails to build on mips{,el}:
> >
> > /home/doko/gcc/gcc-snapshot-20041003/build/gcc/xgcc -shared-libgcc -B/home/doko/gcc/gcc-snapshot-20041003/build/gcc/ -nostdinc++ -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/bin/ -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/lib/ -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/include -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/sys-include -shared -nostdlib /usr/lib/crti.o /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtbeginS.o .libs/libgcj.la-2.o -Wl,--whole-archive ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a ./libltdl/.libs/libltdlc.a -Wl,--no-whole-archive -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-g
 nu/libjava ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a -lpthread ./libltdl/.libs/libltdlc.a -ldl -lz -L/home/doko/gcc/gcc-snapshot-20041003/build/gcc -lgcc_s -lc -lgcc_s /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtendS.o /usr/lib/crtn.o -Wl,-soname -Wl,libgcj.so.6 -o .libs/libgcj.so.6.0.0
> > /usr/lib/libc_nonshared.a(atexit.oS)(.text+0x38): In function `atexit':
> > : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@@GLIBC_2.2
> > collect2: ld returned 1 exit status
> > make[2]: *** [libgcj.la] Error 1
> >
> > can be fixed by compiling glibc's atexit with -mxgot
>
> This needs _two_ sets of those objects then, because a link employing
> multigot will silently break over xgot objects.

Does this problem come from glibc's compilation problem?

> > (at least that's the way mozilla succeeded to build).
>
> Actually, no, mozilla uses the standard gcc/libc objects. It believe it
> happens to work because those objects are linked in earlier, so their
> GOT entry offset doesn't exceed the limit.

Do you know what's the actual problem?

Regards,
-- gotom

Revision history for this message
In , GOTO Masanori (gotom-debian) wrote :
Download full text (3.6 KiB)

reassign 274738 binutils
severity 274738 important
thanks

At Tue, 05 Oct 2004 10:04:20 +0900,
GOTO Masanori wrote:
> At Mon, 4 Oct 2004 00:25:00 +0200,
> Thiemo Seufer wrote:
> > > current mainline libgcj fails to build on mips{,el}:
> > >
> > > /home/doko/gcc/gcc-snapshot-20041003/build/gcc/xgcc -shared-libgcc -B/home/doko/gcc/gcc-snapshot-20041003/build/gcc/ -nostdinc++ -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/bin/ -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/lib/ -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/include -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/sys-include -shared -nostdlib /usr/lib/crti.o /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtbeginS.o .libs/libgcj.la-2.o -Wl,--whole-archive ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a ./libltdl/.libs/libltdlc.a -Wl,--no-whole-archive -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux
 -g
> nu/libjava ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a -lpthread ./libltdl/.libs/libltdlc.a -ldl -lz -L/home/doko/gcc/gcc-snapshot-20041003/build/gcc -lgcc_s -lc -lgcc_s /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtendS.o /usr/lib/crtn.o -Wl,-soname -Wl,libgcj.so.6 -o .libs/libgcj.so.6.0.0
> > > /usr/lib/libc_nonshared.a(atexit.oS)(.text+0x38): In function `atexit':
> > > : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@@GLIBC_2.2
> > > collect2: ld returned 1 exit status
> > > make[2]: *** [libgcj.la] Error 1
> > >
> > > can be fixed by compiling glibc's atexit with -mxgot
> >
> > This needs _two_ sets of those objects then, because a link employing
> > multigot will silently break over xgot objects.
>
> Does this problem come from glibc's compilation problem?
>
> > > (at least that's the way mozilla succeeded to build).
> >
> > Actually, no, mozilla uses the standard gcc/libc objects. It believe it
> > happens to work because those objects are linked in earlier, so their
> > GOT entry offset doesn't exceed the limit.
>
> Do you know what's the actual problem?

This is my memorandum, and the summary. If you find mistake, please
follow up it.

 mips/mipsel has long-standing problem about GOT handling. The
 GOT size is limited to 16KB and it's sometimes small. This
 report is affected by this problem.

 There're two ways to fix this problem; multiGOT and XGOT.
 XGOT is originally developed in IRIX. It uses 32bit GOT, so
 we don't need to worry about overflow of the table size.
 Matthias suggested to use -mxgot. However, unfortunatelly, we
 may lose binary compatibility (said by Thiemo). Thiemo said
 it's nicer than multiGOT. OTOH, multiGOT is to have multiple
 GOT - Daniel suggested it. He said binutils should be fixed
 if it does not work. Note that multiGOT is firstly supported
 by Alexandre Oliva in binutils 2.15 development.

In debian-mips, there were discus...

Read more...

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (4.0 KiB)

Message-ID: <email address hidden>
Date: Thu, 14 Oct 2004 09:58:08 +0900
From: GOTO Masanori <email address hidden>
To: Thiemo Seufer <email address hidden>,
 <email address hidden>
Cc: Matthias Klose <email address hidden>,
 Daniel Jacobowitz <email address hidden>, <email address hidden>, <email address hidden>
Subject: Re: Bug#274738: on mips{,el} atexit.o should be compiled with -mxgot

reassign 274738 binutils
severity 274738 important
thanks

At Tue, 05 Oct 2004 10:04:20 +0900,
GOTO Masanori wrote:
> At Mon, 4 Oct 2004 00:25:00 +0200,
> Thiemo Seufer wrote:
> > > current mainline libgcj fails to build on mips{,el}:
> > >
> > > /home/doko/gcc/gcc-snapshot-20041003/build/gcc/xgcc -shared-libgcc -B/home/doko/gcc/gcc-snapshot-20041003/build/gcc/ -nostdinc++ -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/bin/ -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/lib/ -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/include -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/sys-include -shared -nostdlib /usr/lib/crti.o /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtbeginS.o .libs/libgcj.la-2.o -Wl,--whole-archive ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a ./libltdl/.libs/libltdlc.a -Wl,--no-whole-archive -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux
 -g
> nu/libjava ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a -lpthread ./libltdl/.libs/libltdlc.a -ldl -lz -L/home/doko/gcc/gcc-snapshot-20041003/build/gcc -lgcc_s -lc -lgcc_s /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtendS.o /usr/lib/crtn.o -Wl,-soname -Wl,libgcj.so.6 -o .libs/libgcj.so.6.0.0
> > > /usr/lib/libc_nonshared.a(atexit.oS)(.text+0x38): In function `atexit':
> > > : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@@GLIBC_2.2
> > > collect2: ld returned 1 exit status
> > > make[2]: *** [libgcj.la] Error 1
> > >
> > > can be fixed by compiling glibc's atexit with -mxgot
> >
> > This needs _two_ sets of those objects then, because a link employing
> > multigot will silently break over xgot objects.
>
> Does this problem come from glibc's compilation problem?
>
> > > (at least that's the way mozilla succeeded to build).
> >
> > Actually, no, mozilla uses the standard gcc/libc objects. It believe it
> > happens to work because those objects are linked in earlier, so their
> > GOT entry offset doesn't exceed the limit.
>
> Do you know what's the actual problem?

This is my memorandum, and the summary. If you find mistake, please
follow up it.

 mips/mipsel has long-standing problem about GOT handling. The
 GOT size is limited to 16KB and it's sometimes small. This
 report is affected by this problem.

 There're two ways to fix this problem; multiGOT and XGOT.
 XGOT is originally developed in IRIX. It uses 32bit GOT, so
 we don't need to worry about overf...

Read more...

Revision history for this message
In , Matthias Klose (doko-cs) wrote : Re: Re: Bug#274738: on mips{,el} atexit.o should be compiled with -mxgot

severity 274738 serious
thanks

as seen in the buildd logs, gcc-3.4 now fails to build from source on
mips/mipsel.

the patch proposed in

 http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00325.html

tries to work around the problem, but it was suggested, that binutils
itself should be fixed.

 http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00508.html

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Fri, 22 Oct 2004 08:38:39 +0200
From: Matthias Klose <email address hidden>
To: <email address hidden>
Cc: <email address hidden>, GOTO Masanori <email address hidden>,
 Thiemo Seufer <email address hidden>, Daniel Jacobowitz <email address hidden>
Subject: Re: Re: Bug#274738: on mips{,el} atexit.o should be compiled with -mxgot

severity 274738 serious
thanks

as seen in the buildd logs, gcc-3.4 now fails to build from source on
mips/mipsel.

the patch proposed in

 http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00325.html

tries to work around the problem, but it was suggested, that binutils
itself should be fixed.

 http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00508.html

Revision history for this message
In , Matthias Klose (doko-cs) wrote : same behaviour in sarge and sid

tags 274738 - sid
thanks

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Fri, 22 Oct 2004 19:04:39 +0200
From: Matthias Klose <email address hidden>
To: <email address hidden>
Subject: same behaviour in sarge and sid

tags 274738 - sid
thanks

Revision history for this message
In , Matthias Klose (doko-cs) wrote :

severity 274738 important
thanks

libgcj5 isn't built anymore for mips{,el}, lowering the severity.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 23 Nov 2004 08:43:54 +0100
From: Matthias Klose <email address hidden>
To: <email address hidden>
Cc: <email address hidden>
Subject: Re: on mips{,el} atexit.o should be compiled with -mxgot

severity 274738 important
thanks

libgcj5 isn't built anymore for mips{,el}, lowering the severity.

Revision history for this message
In , Thiemo Seufer (ths-networkno) wrote : Finally a fix for this mess
Download full text (18.2 KiB)

retitle 274738 [mips, mipsel] Fix dynamic function call stub for big binaries
tags 274738 +patch
thanks

The root of this problem was the stub created for lazily resolved
function references. It uses currently a signed 16 bit immediate
for the symbol index, which wraps to negative values for more than
2^15 symbols, which caused ld.so to load garbage as function pointer.

The appended patch fixes this, and supersedes the current mips-specific
xgot workaround (120_mips_xgot_multigot_workaround.dpatch). This patch
already went in upstream.

Applying this patch is a preliminary to make ghc and gcj work reliably
for mips/mipsel. Applying this patch will also cause all current xgot
users to fail, until the xgot option is removed for them. Those were
some weeks ago:

asterisk-oh323_0.7.3-2
asterisk_1:1.2.4.dfsg-6
enigmail_2:0.93-1
gnugk_2:2.2.3-2-2
inkscape_0.43-4
mozilla-thunderbird_1.0.7-3
mozilla_2:1.7.12-1.1
nvu_1.0final-1
ohphone_1:1.4.5+20060204-1
openam_1.1.18+20050304-2
openh323_1.18.0-1
openmcu_2.1.1-2
pstngw_1.3.1-6
python-qt3_3.15-4
qt-x11-free_3:3.3.6-1
t38modem_0.8.0+20050304-2
thunderbird_1.5-4
vegastrike_0.4.3-4
xulrunner_1.8.0.1-5

plus firefox, for which I did a test build without xgot to verify the
patch. I plan to do patches for them in the next days.

Thiemo

#! /bin/sh -e
## 122_mips_dynsymstub.dpatch
##
## DP: Description:
## DP: Author: Dave Daney <email address hidden>, Richard Sandiford <email address hidden>, Thiemo Seufer <email address hidden>
## DP: Upstream status: In trunk and 2.17 branch.
## DP: Date: 2006-06-12

if [ $# -lt 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
    -patch) patch -p0 ${patch_opts} < $0;;
    -unpatch) patch -R -p0 ${patch_opts} < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac

exit 0

@DPATCH@
Index: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.169
retrieving revision 1.172
diff -u -p -r1.169 -r1.172
--- bfd/elfxx-mips.c 22 May 2006 15:06:22 -0000 1.169
+++ bfd/elfxx-mips.c 11 Jun 2006 08:33:26 -0000 1.172
@@ -335,6 +335,8 @@ struct mips_elf_link_hash_table
   bfd_vma plt_header_size;
   /* The size of a PLT entry in bytes (VxWorks only). */
   bfd_vma plt_entry_size;
+ /* The size of a function stub entry in bytes. */
+ bfd_vma function_stub_size;
 };

 #define TLS_RELOC_P(r_type) \
@@ -623,20 +625,25 @@ static bfd *reldyn_sorting_bfd;
 #define MIPS_ELF_GOT_MAX_SIZE(INFO) (ELF_MIPS_GP_OFFSET (INFO) + 0x7fff)

 /* Instructions which appear in a stub. */
-#define STUB_LW(abfd) \
- ((ABI_64_P (abfd) \
- ? 0xdf998010 /* ld t9,0x8010(gp) */ \
- : 0x8f998010)) /* lw t9,0x8010(gp) */
-#define STUB_MOVE(abfd) \
- ((ABI_64_P (abfd) \
- ? 0x03e0782d /* daddu t7,ra */ \
- : 0x03e07821)) /* addu t7,ra */
-#define STUB_JALR 0x0320f809 /* jalr t9,ra...

Revision history for this message
In , Thiemo Seufer (ths-networkno) wrote : Blocked by binutils #274738

block 374372 by 274738
block 374374 by 274738
thanks

Revision history for this message
In , Mike Hommey (mh-glandium) wrote : Re: Bug#374372: [PATCH] Preemptive fix for mips/mipsel

clone 374372 -1
reassign -1 xulrunner
thanks

Note to self : will need to change build-depends to be sure the right
binutils is used.

On Mon, Jun 19, 2006 at 12:43:07AM +0100, Thiemo Seufer <email address hidden> wrote:
> Package: firefox
> Version: 1.5.dfsg+1.5.0.4-1
> Serverity: important
> Tags: patch
>
> Fixing bug #274738 for binutils will allow to build firefox without the
> xgot hack on mips/mipsel. Since this may also break the existing xgot
> support, a rebuild with the appended patch is needed then.
>
>
> Thiemo
>
>
> --- config/rules.mk.orig 2006-06-12 14:51:28.000000000 +0100
> +++ config/rules.mk 2006-06-12 14:51:42.000000000 +0100
> @@ -456,15 +456,6 @@ endif
> endif
> endif
>
> -ifeq ($(OS_ARCH),Linux)
> -ifneq (,$(filter mips mipsel,$(OS_TEST)))
> -ifneq (,$(filter layout content xul xuldoc xultmpl svg_doc view dom jsurl,$(MODULE)))
> -OS_CFLAGS += -Wa,-xgot
> -OS_CXXFLAGS += -Wa,-xgot
> -endif
> -endif
> -endif
> -
> #
> # HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag
> # which uses internal symbols first
>
>

Revision history for this message
In , Thiemo Seufer (ths-networkno) wrote : Blocked by binutils #274738

block 374727 by 274738
thanks

Revision history for this message
In , Thiemo Seufer (ths-networkno) wrote :

block 374798 by 274738
thanks

Revision history for this message
In , Thiemo Seufer (ths-networkno) wrote :

block 374882 by 274738
block 374883 by 274738
thanks

Revision history for this message
In , James Troup (james-nocrew) wrote : Bug#274738: fixed in binutils 2.17-1
Download full text (3.6 KiB)

Source: binutils
Source-Version: 2.17-1

We believe that the bug you reported is fixed in the latest version of
binutils, which is due to be installed in the Debian FTP archive:

binutils-dev_2.17-1_i386.deb
  to pool/main/b/binutils/binutils-dev_2.17-1_i386.deb
binutils-doc_2.17-1_all.deb
  to pool/main/b/binutils/binutils-doc_2.17-1_all.deb
binutils-multiarch_2.17-1_i386.deb
  to pool/main/b/binutils/binutils-multiarch_2.17-1_i386.deb
binutils_2.17-1.diff.gz
  to pool/main/b/binutils/binutils_2.17-1.diff.gz
binutils_2.17-1.dsc
  to pool/main/b/binutils/binutils_2.17-1.dsc
binutils_2.17-1_i386.deb
  to pool/main/b/binutils/binutils_2.17-1_i386.deb
binutils_2.17.orig.tar.gz
  to pool/main/b/binutils/binutils_2.17.orig.tar.gz

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
James Troup <email address hidden> (supplier of updated binutils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 26 Jun 2006 13:17:36 +0100
Source: binutils
Binary: binutils-dev binutils-hppa64 binutils-multiarch binutils binutils-doc
Architecture: source i386 all
Version: 2.17-1
Distribution: unstable
Urgency: low
Maintainer: James Troup <email address hidden>
Changed-By: James Troup <email address hidden>
Description:
 binutils - The GNU assembler, linker and binary utilities
 binutils-dev - The GNU binary utilities (BFD development files)
 binutils-doc - Documentation for the GNU assembler, linker and binary utilities
 binutils-multiarch - Binary utilities that support multi-arch targets
Closes: 274738
Changes:
 binutils (2.17-1) unstable; urgency=low
 .
   * New upstream release.
    * 120_mips_xgot_multigot_workaround.dpatch: removed - superseded by a
      proper fix upstream. Closes: #274738
    * debian/binutils.shlibs, debian/binutils-multiarch.shlibs,
      debian/binutils-hppa64.shlibs: updated SONAME to 2.17.
Files:
 0eee46784088ba0b8477ed0e3fa8ed8b 1474 devel standard binutils_2.17-1.dsc
 152f9841d310bd5e231c213f549ea484 18196360 devel standard binutils_2.17.orig.tar.gz
 82a06dbd7f62a8a5a06b983d1af72a3b 41955 devel standard binutils_2.17-1.diff.gz
 7c0bceba31b032e5d7cc340d733fbecd 482874 doc optional binutils-doc_2.17-1_all.deb
 f6b0915dd71eedf9170e8eb99b31b9ad 2605738 devel standard binutils_2.17-1_i386.deb
 4e86d06a08167ae4c6a3780b0773565f 2496314 devel extra binutils-dev_2.17-1_i386.deb
 45bd385b2e3759ef062fe49155495e95 7744578 devel extra binutils-multiarch_2.17-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iQIVAwUBRJ/aEdfD8TGrKpH1AQL5rA//ezkR2CMcWGyGzVsgrbyUPQep1xoQ1/FZ
2bHYxf2mbfQGJxsjUQIOziFtcrGpQAW0t8Y9uMlso/Y9ONsywbukIbdUNdLCfxcH
6GS9Q9BiJh51QozcESFtdxQMnzcYKVwr+xwoylvZJryrbkqnpesQIEzEbDsShWRc
Q9mfHaH4NEF/VwcRR4bf5adTJlXk3s4UlxIZ+pk7xpWd/uBQE...

Read more...

Changed in glibc:
status: Unconfirmed → Fix Released
Revision history for this message
In , Andreas Metzler (ametzler-downhill) wrote : Preemptive fix for mips/mipsel

Version: 2:1.8+1.0.6-1

In iceape ./patches/68_mips_performance.dpatch seems to do the right thing:

----------------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## 68_mips_performance.dpatch by Mike Hommey <email address hidden>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Patch from Thiemo Seufer to increase stability and performance on mips.

@DPATCH@

=== config/rules.mk
==================================================================
--- xulrunner/config/rules.mk (revision 22)
+++ xulrunner/config/rules.mk (local)
@@ -456,15 +456,6 @@ endif
 endif
 endif

-ifeq ($(OS_ARCH),Linux)
-ifneq (,$(filter mips mipsel,$(OS_TEST)))
-ifeq ($(MODULE),layout)
-OS_CFLAGS += -Wa,-xgot
-OS_CXXFLAGS += -Wa,-xgot
-endif
-endif
-endif
-
 #
 # HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag
 # which uses internal symbols first
=== configure.in
==================================================================
--- xulrunner/configure.in (revision 22)
+++ xulrunner/configure.in (local)
@@ -1481,8 +1481,6 @@
         MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS=1
     ;;
     mips*)
- CFLAGS="$CFLAGS -Wa,-xgot"
- CXXFLAGS="$CXXFLAGS -Wa,-xgot"
     ;;
     esac
     ;;
----------------------
cu andreas
--
The 'Galactic Cleaning' policy undertaken by Emperor Zhark is a personal
vision of the emperor's, and its inclusion in this work does not constitute
tacit approval by the author or the publisher for any such projects,
howsoever undertaken. (c) Jasper Ffforde

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.