[uClibc 0001345]: uClibc fails to mmap shared libraries with CONFIG_PAGE_SIZE_16KB set in kernel

bugs at busybox.net bugs at busybox.net
Mon May 14 11:36:19 UTC 2007


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1345 
====================================================================== 
Reported By:                redhatter
Assigned To:                uClibc
====================================================================== 
Project:                    uClibc
Issue ID:                   1345
Category:                   Architecture Specific
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             05-13-2007 17:40 PDT
Last Modified:              05-14-2007 04:36 PDT
====================================================================== 
Summary:                    uClibc fails to mmap shared libraries with
CONFIG_PAGE_SIZE_16KB set in kernel
Description: 
Hi...

Recently I started building some uClibc userland environments for a mipsel
target.  My build host is a Lemote Fulong miniPC running a Loongson2E
processor (subset MIPS-3), and I've also been doing testing with a Cobalt
Qube2 (MIPS-4).

Everything builds fine, however, when I try to chroot in on the Loongson,
I get told uClibc "can't map" the libraries.  However, when I rsync this
chroot across to the Qube2, everything works fine.

It would appear that uClibc's ld.so assumes the kernel uses a page size of
4KB (0x1000).  When it specifies an offset of 0x3000, this works fine on a
kernel with a 4KB page size, since 3×1000h=3000h.  However, this fails
when the kernel has a 16KB page size (0x4000), since 0x3000 is not a
multiple of 0x4000.  Presumably it'll fail when 64KB pages are in use too.
====================================================================== 

---------------------------------------------------------------------- 
 redhatter - 05-13-07 17:42  
---------------------------------------------------------------------- 
Whoops, this was _meant_ for the uClibc project, not buildroot.  Can this
be reassigned please? 

---------------------------------------------------------------------- 
 bernhardf - 05-14-07 00:44  
---------------------------------------------------------------------- 
reassigning upon request.
If this report is really about 0.9.27, then i suggest you retry with
0.9.29 or trunk and follow up. 

---------------------------------------------------------------------- 
 redhatter - 05-14-07 04:36  
---------------------------------------------------------------------- 
It's about 0.9.28, I'm yet to try 0.9.29 (I've been using the ebuilds in
the Gentoo portage tree).

I've also just discovered that the Loongson machines won't run with a page
size of 4KB, they require a 16KB page size, thus the linker will need to be
fixed.

I notice in ldso/ldso/mips/dl-sysdep.h, the following #defines are
present:
/* 4096 bytes alignment */
#define PAGE_ALIGN 0xfffff000
#define ADDR_ALIGN 0xfff
#define OFFS_ALIGN 0x7ffff000

I presume these are what need to be tweaked?  Has this part changed wildly
since 0.9.28? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-13-07 17:40  redhatter      New Issue                                    
05-13-07 17:40  redhatter      Status                   new => assigned     
05-13-07 17:40  redhatter      Assigned To               => buildroot       
05-13-07 17:42  redhatter      Note Added: 0002354                          
05-14-07 00:15  jacmet         Project                  buildroot => uClibc 
05-14-07 00:44  bernhardf      Note Added: 0002355                          
05-14-07 00:44  bernhardf      Assigned To              buildroot => uClibc 
05-14-07 04:36  redhatter      Note Added: 0002356                          
======================================================================




More information about the uClibc-cvs mailing list