[uClibc]uClibc PowerPc release 0.9.9 -- problem with mmap()

Sehnert, William R SehneWR at LOUISVILLE.STORTEK.COM
Wed Feb 6 13:32:41 UTC 2002


> 
> 
> On Tue Feb 05, 2002 at 12:01:22PM -0700, Sehnert, William R wrote:
> > 
> > I am trying to get the uClib-0.9.9 working on a powerpc linux
> > platform.  There seems to be a problem with the mmap() syscall.
> > The file descriptor 'fd' seems to be zeroed out.   I did a
> > _dl_dprintf with the parameters for mmap and they seem to be
> > correct. but when I print the data from the kernels sys_mmap,
> > the fd parameter is zero, (which of course fails the mmap).
> 
> Could you try taking the version from ldso/ldso/ld_syscall.h
> 
>     _syscall6(void *, _dl_mmap, void *, start, size_t, 
> length, int, prot, int, flags, int, fd, off_t, offset);
> 
> and stuffing that in into libc/sysdeps/linux/powerpc/_mmap.c 
> (replacing the current stuff) and let me know if that works?
> 
>  -Erik
> 
> --
> Erik B. Andersen             http://codepoet-consulting.com/
> --This message was written using 73% post-consumer electrons--
> 

I found the problem.  It is not with uClibc.  I am using Linux 2.4.16
compiled for the IBM405 PowerPC.  There is a bug in the system call 
handler which that clears R7 (the 'fd' parameter) before calling mmap().

Thanks for the help!
Bill



More information about the uClibc mailing list