[uClibc]Re: pread/pwrite broken w/o large file support
David Blythe
blythe at broadon.com
Fri Jul 5 01:39:36 UTC 2002
Several of the 64 bit calls are busted in the ppc implementation. The
powerpc must put an ll parameter in an odd,even register pair, so it
leaves a hole to get to the next pair if necessary. This can't be coded
using the existing syscall macros in a machine independent way. I
rewrote the ppc syscall implementation to use a version of the unified
system call interface and bypassed the syscall macros altogether. I
still had to fix the [f]truncate64 wrapper that does the wrong thing for
ppc (cf. glibc). I'm not sure what you would do if you want to continue
using the C syscall macros short of moving the implementation into the
architecture-specific directories and coding by hand.
I'll post a patch (against 9.11) with the unified syscall interface for
ppc later today or tomorrow.
david
Ronald Wahl wrote:
> On 04 Jul 2002 12:34:06 +0200, Ronald Wahl wrote:
>
>
>>Now I inserted a printk in the pread syscall that outputs the
>>offset. The high part has some arbitrary value (and changes during the
>>execution). So you are right. But what is the solution? Splitting does
>>not work.
>>
>
> After a bit of searching I noticed the following: Look at the signature
> of sys_pread in kernel:
>
> asmlinkage ssize_t sys_pread(unsigned int fd, char * buf,
> size_t count, loff_t pos);
>
> Looking at the assembler output of this routine I found that there is a
> hole in register allocation because of alignment issues. The argument
> "pos" is contained in r7 and r8, i.e. it is aligned to 64bit. But the
> _syscall5 puts "pos" into r6 and r7. What is the right way to go here?
>
> ron
>
>
More information about the uClibc
mailing list