|
From: | Dalsoo Ryang |
Subject: | illegal instruction exception with glibc 2.3.2 |
Date: | Tue, 31 May 2005 16:32:55 -0400 |
A bug is found in glibc 2.3.2. Please check the following for the problem and
fix.
Dalsoo Ryang
ivivity inc.
address@hidden, address@hidden,
(tel) 678-990-1550 x245
Synopsis: illegal instruction exception happens when dynamically linked
files are executed.
Category: libc
Release: libc 2.3.2
Environment: <dell notebook, redhat linux,mipsel, kernel
headers:2.4.18,compiler version 3.4.1, binutils-2.15..>
Description:
Executables statically linked works fine, but dynamically linked
executables don't work and these print "illegal instruction
exception".
Problem is in section headers of ".ctors" and ".dtors". Null
terminator should be at the end of sections but these are not added.
Fix: __attribute_ of sofini.c has been modified for ".ctors" and
".dtors" to have an attribute "used". A patch is attached to this
e-mail
--=-RTVahHcCWrn04nev6rm4
Content-Disposition: attachment; filename=glibc-2.3.2-mips-sofini.patch
Content-Type: text/plain; name=glibc-2.3.2-mips-sofini.patch;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Fix to add null terminators to sections .ctors and .dtors.
--- glibc-2.3.2/elf/sofini.c.orig 2005-05-27 11:29:04.174503448
-0400
+++ glibc-2.3.2/elf/sofini.c 2005-05-27 11:29:14.462939368 -0400
@@ -2,10 +2,10 @@
null pointer words in the `.ctors' and `.dtors' sections. */
=20
static void (*const __CTOR_END__[1]) (void)
- __attribute__ ((unused, section (".ctors")))
+ __attribute__ ((used, section (".ctors")))
=3D { 0 };
static void (*const __DTOR_END__[1]) (void)
- __attribute__ ((unused, section (".dtors")))
+ __attribute__ ((used, section (".dtors")))
=3D { 0 };
=20
#ifdef HAVE_DWARF2_UNWIND_INFO
@@ -14,6 +14,6 @@
=20
typedef unsigned int ui32 __attribute__ ((mode (SI)));
static ui32 __FRAME_END__[1]
- __attribute__ ((unused, section (".eh_frame")))
+ __attribute__ ((used, section (".eh_frame")))
=3D { 0 };
#endif
Any content within this email is provided "AS IS" for informational purposes only. No contract will be formed between the parties by virtue of this email.
[Prev in Thread] | Current Thread | [Next in Thread] |