Using ldso on sparc

Friedrich Oslage bluebird at porno-bullen.de
Sun May 25 20:23:33 UTC 2008


Hi,

I'm trying to set up an uClibc chroot on my UltraSPARC. Static linking
works out of the box but dynamic does not.

The first error I got was:

'/lib/libc.so.0' is not an ELF executable for sparc

I solved this by patching ldso/ldso/sparc/dl-sysdep.h. This is required
because uClibc is compiled with -mcpu=v9 and the EM_SPARC magic is for
-mcpu=v7 only.

The second error I got was:

Bus error

which happend when the loader-code tried to assign a value to
tpnt->st_dev in ldso/ldso/dl-elf.c(line 717). I "solved" this by just
changing the type of st_dev to int in struct elf_resolve.


With these changes, dynamic linking works again, at least with simple
hello world apps, haven't tested anything more complex yet. But I don't
really understand the dev_t thing. So, if someone can enlighten me,
please do. :)

Regards,
Friedrich Oslage
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uclibc-sparc.patch
Type: text/x-patch
Size: 1094 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20080525/4084f723/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20080525/4084f723/attachment-0002.pgp 


More information about the uClibc mailing list