[uClibc] uClibc-0.9.21 ppc dynamic linker crash + fix
Ronald Wahl
rwa at peppercon.com
Wed Sep 10 13:41:57 UTC 2003
Hello,
I had the problem that all dynamically linked applications crashed with an
"Illegal instruction" if uClibc-0.9.21 is used. The platform is PowerPC. The
crash occured during call of "_dl_load_shared_library()". Fix below. An
alternative fix is to prepend a "static" to the three variables. Maybe the
gcc is involved here. Version is 2.95.3 from MontaVista (HardHat).
- ron
Index: ldso/ldso/readelflib1.c
===================================================================
RCS file: /var/CVS/eric_firmware/uClibc/ldso/ldso/readelflib1.c,v
retrieving revision 1.1.9.3
diff -u -r1.1.9.3 readelflib1.c
--- ldso/ldso/readelflib1.c 9 Sep 2003 13:48:19 -0000 1.1.9.3
+++ ldso/ldso/readelflib1.c 10 Sep 2003 13:23:31 -0000
@@ -223,9 +223,9 @@
const char *pnt, *pnt1;
struct elf_resolve *tpnt1;
const char *libname;
- const char libc6[] = "libc.so.6";
- const char libc5[] = "libc.so.5";
- const char aborted_wrong_lib[] = "%s: aborted attempt to load %s!\n";
+ const char * libc6 = "libc.so.6";
+ const char * libc5 = "libc.so.5";
+ const char * aborted_wrong_lib = "%s: aborted attempt to load %s!\n";
_dl_internal_error_number = 0;
libname = full_libname;
More information about the uClibc
mailing list