[PATCH 2/2] Properly support lseek for n32 and x32

Mike Frysinger vapier at gentoo.org
Sun Apr 15 20:24:22 UTC 2012


On Sunday 15 April 2012 15:54:13 Denys Vlasenko wrote:
> On 04/15/2012 08:21 PM, H.J. Lu wrote:
> > Linux kernel v3.4 adds x32 support.  Both x32 and n32 use 64bit offset
> > for lseek parameter and return value.  We need u_lrval to handle it
> > properly.  Also we shouldn't check HAVE_LONG_LONG_OFF_T for n32 lseek.
> 
> Please explain further. Not many people are familiar with MIPS...
> 
> Do syscalls on MIPS-n32 return 64-bit values even to 32-bit userspace?
> How userspace is supposed to read that? Is 32-bit MIPS code
> able to read 64-registers, or what?

you can largely think of it like so: MIPS n32 is to n64 as x32 is to x86_64.  
in other words, it's the same thing as the 64bit ABI but with 32bit pointers.  
so yes, 64bit values can pass back & forth in a single register.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20120415/91984346/attachment.bin>


More information about the Strace-devel mailing list