Possible bug in dl-elf.c on m68k.

Groleo Marius groleo at gmail.com
Thu Mar 19 15:50:14 UTC 2009


Hi,

I'm currently having trouble getting uClibc 0.9.30.1 to work on m68k/m5485
processor. It gets stuck when trying to load the first shared library,
libgcc_s.so.
In my attempt to debug the problem I added only _dl_dprintf calls.
All the debug lines are prefixed by filename and line.

I tried to watch the trace of any parameter used in any _dl_mmap call.
I identified these parameters as being(sorry for the long list):
    minvma, maxvma, libaddr, status, piclibc, mmap protection flags,
	tryaddr, piclib2map, ppnt->p_vaddr, dynamic_addr, lib_loadaddr.

The first mapping is done here[ldso/ldso/dl-elf.c:468
libaddr=status'0x80016000']
requesting 0xe000 bytes. The second mapping is tried
here[ldso/ldso/dl-elf.c:586 status'0xffffffff']
but fails. The reason why I *think* it fails is overlapping memory areas.
Here, ldso/ldso/dl-elf.c:563 tryaddr'0x80023000' the address where a mapping
is needed is 0x80023000, but if you add 0x80016000(the first mapping) with
0xE000 you get 0x80024000, which overlaps over the second solicited
address(0x80023000).

Is this the intended behaviour?

Attached you will find the debug.log and the patch for ldso/ldso/dl-elf.c

Many thanks.


-- 
Regards, Groleo!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug.log1
Type: application/octet-stream
Size: 8946 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20090319/d0598fda/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug.patch
Type: text/x-patch
Size: 4136 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20090319/d0598fda/attachment.bin>


More information about the uClibc mailing list