[klibc] Re: sys_mmap2 on different architectures

David S. Miller davem at davemloft.net
Wed Feb 22 17:03:44 PST 2006

From: "H. Peter Anvin" <hpa at zytor.com>
Date: Wed, 22 Feb 2006 16:59:04 -0800

> On the other hand, sys32_mmap2 on SPARC64 matches the SPARC32 sys_mmap2 
> in that the shift is hard-coded to 12:
>          .globl          sys32_mmap2
> sys32_mmap2:
>          sethi           %hi(sys_mmap), %g1
>          jmpl            %g1 + %lo(sys_mmap), %g0
>           sllx           %o5, 12, %o5

Another good catch...

> At this point, I'm more than willing to treat SPARC as a special case, 
> but I really want to know what the rules actually _ARE_ as opposed to 
> what they are supposed to be (which they clearly are not.)

I have to admit I'm totally stumped...

Why are you invoking mmap2() instead of mmap64() btw?

More information about the klibc mailing list