svn commit: trunk/uClibc/ldso/include
Peter Kjellerstedt
peter.kjellerstedt at axis.com
Thu Feb 23 16:23:20 UTC 2006
> -----Original Message-----
> From: uclibc-bounces at uclibc.org
> [mailto:uclibc-bounces at uclibc.org] On Behalf Of Mike Frysinger
> Sent: Thursday, February 23, 2006 16:12
> To: uclibc at uclibc.org
> Subject: Re: svn commit: trunk/uClibc/ldso/include
>
> On Thursday 23 February 2006 09:23, Peter Kjellerstedt wrote:
> > The patch below breaks at least CRIS, and I suspect a couple
> > of more architectures... The reason is that previously the
> > code caused mmap() to be used whereas the never version uses
> > mmap2() (at least this is the case with CRIS). However, someone
> > made an assumption a long time ago that all architectures use
> > 12 as page shift with mmap2() independent of the real value of
> > PAGE_SHIFT. Unfortunately, this is not true...
>
> the mmap files in libc/sysdeps/linux/common/ also make this assumption
Good point. Also found out why this has never been a problem
for us. It turned out that the common mmap64() never got to
use the mmap2() function but rather used mmap(), due to a
lack of inclusion of sys/syscall.h...
> > I will commit a fix to make it possible to define MMAP2_PAGE_SHIFT
> > in the architecture specific files, and do so for CRIS. However,
> > I cannot fix any other architectures, as I do not know which need
> > fixing (I suspect m68k might need it).
>
> please add the define to
> libc/sysdeps/linux/*/bits/uClibc_arch_features.h so
> we can share it between ldso/libc
I put it in libc/sysdeps/linux/*/bits/uClibc_page.h as that
seemed most appropriate. I have only added it for CRIS, but
I am pretty sure at least m68k should define it as well.
All architectures which do not define MMAP2_PAGE_SHIFT will
rely on it defaulting to 12.
It might be a good idea to remove the default handling and
break all architectures until they define MMAP2_PAGE_SHIFT.
This is not something I want to be responsible for though.
> -mike
//Peter
More information about the uClibc
mailing list