[PATCH] pread_write on powerpc

Wade Berrier wberrier at gmail.com
Mon Aug 18 22:26:25 UTC 2008


Hi,

I mailed previously about this issue:

  LD libuClibc-0.9.29.so
libc/libc_so.a(pread_write.os):(.text+0x14): undefined reference to
`__illegally_sized_syscall_arg4'
make[2]: *** [lib/libc.so] Error 1
make[1]: *** [lib/libc.so.0] Error 2

As said here
( http://www.busybox.net/lists/uclibc/2007-March/017682.html ) this is a
linking error that uncovers source code bugs.

The error is because pread/write wants to send an 8 byte value in the
system call, where only 4 bytes are allowed.

I looked at what some other architectures are doing, as well as glibc,
and found that the offset needs to be split up into a 4 byte pair.

It works for the minimal pread tests I've done.

I haven't tested without LFS support, but no patching would be necessary
in that case since the offset would only be 4 bytes.

Attached is a patch against trunk.

Thanks,

Wade
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uclibc-powerpc_pread_write.patch
Type: text/x-patch
Size: 2404 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20080818/c195e813/attachment-0002.bin 


More information about the uClibc mailing list