on mips{,el} atexit.o should be compiled with -mxgot
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://
In Debian Bug tracker #274738, Thiemo Seufer (ica2-ts) wrote : Re: Bug#274738: on mips{,el} atexit.o should be compiled with -mxgot | #1 |
Debian Bug Importer (debzilla) wrote : | #2 |
Automatically imported from Debian bug report #274738 http://
Debian Bug Importer (debzilla) wrote : | #3 |
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
UGFja2FnZTogZ2x
dCBtYWlubGluZSB
ZS9kb2tvL2djYy9
ZC1saWJnY2MgLUI
Z2NjLyAtbm9zdGR
My9idWlsZC9taXB
L2djYy9nY2Mtc25
dGRjKystdjMvc3J
eC1nbnUvYmluLyA
Yi8gLWlzeXN0ZW0
bHVkZSAtaXN5c3R
eXMtaW5jbHVkZSA
by9nY2MvZ2NjLXN
cy9saWJnY2oubGE
YmZmaV9jb252ZW5
bmNlLmEgLi9saWJ
ZSAgLUwvaG9tZS9
LWxpbnV4LWdudS9
aG90LTIwMDQxMDA
bGlicyAtTC9ob21
ZWwtbGludXgtZ25
ZS5hIC4uL2JvZWh
IC4vbGlibHRkbC8
Z2NjLXNuYXBzaG9
IC9ob21lL2Rva28
Uy5vIC91c3IvbGl
aWJzL2xpYmdjai5
b1MpKC50ZXh0KzB
cnVuY2F0ZWQgdG8
DQpjb2xsZWN0Mjo
aWJnY2oubGFdIEV
IGF0ZXhpdCB3aXR
c3VjY2VlZGVkIHR
Debian Bug Importer (debzilla) wrote : | #4 |
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/
e/doko/
c-snapshot-
c/gcc-snapshot-
r/lib/gcc-
ux-gnu/lib/ -isystem /usr/lib/
m /usr/lib/
/lib/crti.o /home/doko/
s/libgcj.la-2.o -Wl,--whole-archive ../libffi/
/boehm-
whole-archive -L/home/
u/libstdc++-v3/src -L/home/
x-gnu/libstdc+
ipsel-linux-
ibs/libgcjgc_
/home/doko/
/doko/gcc/
oname -Wl,libgcj.so.6 -o .libs/libgcj.
> /usr/lib/
> : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@
> 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
James Troup (elmo) wrote : | #5 |
mipsen not a warty release arch
In Debian Bug tracker #274738, GOTO Masanori (gotom-debian) wrote : | #6 |
At Mon, 4 Oct 2004 00:25:00 +0200,
Thiemo Seufer wrote:
> > current mainline libgcj fails to build on mips{,el}:
> >
> > /home/doko/
nu/libjava ../libffi/
> > /usr/lib/
> > : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@
> > 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
Debian Bug Importer (debzilla) wrote : | #7 |
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/
nu/libjava ../libffi/
> > /usr/lib/
> > : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@
> > 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
In Debian Bug tracker #274738, GOTO Masanori (gotom-debian) wrote : | #8 |
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/
-g
> nu/libjava ../libffi/
> > > /usr/lib/
> > > : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@
> > > 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...
Debian Bug Importer (debzilla) wrote : | #9 |
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/
-g
> nu/libjava ../libffi/
> > > /usr/lib/
> > > : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@
> > > 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...
In Debian Bug tracker #274738, Matthias Klose (doko-cs) wrote : Re: Re: Bug#274738: on mips{,el} atexit.o should be compiled with -mxgot | #10 |
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://
tries to work around the problem, but it was suggested, that binutils
itself should be fixed.
Debian Bug Importer (debzilla) wrote : | #11 |
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://
tries to work around the problem, but it was suggested, that binutils
itself should be fixed.
In Debian Bug tracker #274738, Matthias Klose (doko-cs) wrote : same behaviour in sarge and sid | #12 |
tags 274738 - sid
thanks
Debian Bug Importer (debzilla) wrote : | #13 |
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
In Debian Bug tracker #274738, Matthias Klose (doko-cs) wrote : | #14 |
severity 274738 important
thanks
libgcj5 isn't built anymore for mips{,el}, lowering the severity.
Debian Bug Importer (debzilla) wrote : | #15 |
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.
In Debian Bug tracker #274738, Thiemo Seufer (ths-networkno) wrote : Finally a fix for this mess | #16 |
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_
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-
asterisk_
enigmail_2:0.93-1
gnugk_2:2.2.3-2-2
inkscape_0.43-4
mozilla-
mozilla_
nvu_1.0final-1
ohphone_
openam_
openh323_1.18.0-1
openmcu_2.1.1-2
pstngw_1.3.1-6
python-qt3_3.15-4
qt-x11-
t38modem_
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_
##
## 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/
patch_opts=
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/
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_
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_
#define MIPS_ELF_
/* 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...
In Debian Bug tracker #274738, Thiemo Seufer (ths-networkno) wrote : Blocked by binutils #274738 | #17 |
block 374372 by 274738
block 374374 by 274738
thanks
In Debian Bug tracker #274738, Mike Hommey (mh-glandium) wrote : Re: Bug#374372: [PATCH] Preemptive fix for mips/mipsel | #18 |
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/
> +++ 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
>
>
In Debian Bug tracker #274738, Thiemo Seufer (ths-networkno) wrote : Blocked by binutils #274738 | #19 |
block 374727 by 274738
thanks
In Debian Bug tracker #274738, Thiemo Seufer (ths-networkno) wrote : | #20 |
block 374798 by 274738
thanks
In Debian Bug tracker #274738, Thiemo Seufer (ths-networkno) wrote : | #21 |
block 374882 by 274738
block 374883 by 274738
thanks
In Debian Bug tracker #274738, James Troup (james-nocrew) wrote : Bug#274738: fixed in binutils 2.17-1 | #22 |
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-
to pool/main/
binutils-
to pool/main/
binutils-
to pool/main/
binutils_
to pool/main/
binutils_2.17-1.dsc
to pool/main/
binutils_
to pool/main/
binutils_
to pool/main/
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_
proper fix upstream. Closes: #274738
* debian/
debian/
Files:
0eee46784088ba
152f9841d310bd
82a06dbd7f62a8
7c0bceba31b032
f6b0915dd71eed
4e86d06a08167a
45bd385b2e3759
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
iQIVAwUBRJ/
2bHYxf2mbfQGJxs
6GS9Q9BiJh51Qoz
Q9mfHaH4NEF/
Changed in glibc: | |
status: | Unconfirmed → Fix Released |
In Debian Bug tracker #274738, Andreas Metzler (ametzler-downhill) wrote : Preemptive fix for mips/mipsel | #23 |
Version: 2:1.8+1.0.6-1
In iceape ./patches/
-------
#! /bin/sh /usr/share/
## 68_mips_
##
## 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/
+++ xulrunner/
@@ -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/
+++ xulrunner/
@@ -1481,8 +1481,6 @@
;;
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
Matthias Klose wrote: 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 libc_nonshared. a(atexit. oS)(.text+ 0x38): In function `atexit': @GLIBC_ 2.2
> Package: glibc
> Severity: serious
> Tags: sid
>
> current mainline libgcj fails to build on mips{,el}:
>
> /home/doko/
> /usr/lib/
> : relocation truncated to fit: R_MIPS_CALL16 __cxa_atexit@
> 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