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

bugs at busybox.net bugs at busybox.net
Wed Oct 8 11:25:52 UTC 2008


The following issue has been UPDATED. 
====================================================================== 
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:              10-08-2008 04:25 PDT
====================================================================== 
Summary:                    [MIPS] 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
====================================================================== 

---------------------------------------------------------------------- 
 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? 

---------------------------------------------------------------------- 
 falek - 01-29-08 15:15  
---------------------------------------------------------------------- 
The buildroot-20080125 kit, which has uClibc 0.9.29, gives the same error
with our 64K Linux kernel. So it looks like the problem is still with us
in 0.9.29.

RAMDISK: Loading 3960KiB [1 disk] into ram disk... done.
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 384k freed
/sbin/initKernel panic - not syncing: Attempted to kill init!
:500: can't map Rebooting in 180 seconds..'/lib/libcrypt.so.0'
/sbin/init:500: can't map '/lib/libcrypt.so.0'
/sbin/init:500: can't map '/lib/libcrypt.so.0'
/sbin/init: can't load library 'libcrypt.so.0' 

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                          
12-19-07 13:19  alonbl         Issue Monitored: alonbl                      
01-29-08 15:15  falek          Note Added: 0003584                          
01-29-08 15:23  falek          Issue Monitored: falek                       
10-08-08 04:25  bernhardf      Summary                  uClibc fails to mmap
shared libraries with CONFIG_PAGE_SIZE_16KB set in kernel => [MIPS] uClibc fails
to mmap shared libraries with CONFIG_PAGE_SIZE_16KB set in kernel
======================================================================




More information about the uClibc-cvs mailing list