Avoid using libm in rootfs

Thomas Maenner tmaenner at aehr.com
Fri Mar 30 06:45:35 EST 2007


Hi,

Maybe on the same subject or OT, I'm having trouble with ELDK 4.1.0, kernel 
2.4.25, u-boot 1.1.6, kernel and ramdisk copied from flash into RAM on a 
TQM860L module.

Using a fresh ramdisk and installed busybox 1.4.2, plus the shared libs from 
ELDK, init barks that it can not find /lib/libc.so.6, although it's there 
(case 1)

Using fresh ELDK ramdisk, init complains about missing libm.so.6, although it 
is there... (case 2)

Some ldd and readelf output:

case 1:
devel01:/devel/abts_devel/work/tom/tq_ramdisk # ppc_8xx-ldd 
tmp_mount/bin/busybox
        libcrypt.so.1 
=> /devel.rtl01/bist_devel/tools/ppc/eldk-4.1.0/ppc_8xx/lib/libcrypt.so.1
        libc.so.6 
=> /devel.rtl01/bist_devel/tools/ppc/eldk-4.1.0/ppc_8xx/lib/libc.so.6
        ld.so.1 
=> /devel.rtl01/bist_devel/tools/ppc/eldk-4.1.0/ppc_8xx/lib/ld.so.1

devel01:/devel/abts_devel/work/tom/tq_ramdisk # ppc_8xx-readelf -d 
tmp_mount/bin/busybox | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libcrypt.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]

case 2:
devel01:/devel/abts_devel/work/tom/tq_ramdisk # ppc_8xx-ldd new/bin/busybox
        libcrypt.so.1 
=> /devel.rtl01/bist_devel/tools/ppc/eldk-4.1.0/ppc_8xx/lib/libcrypt.so.1
        libm.so.6 
=> /devel.rtl01/bist_devel/tools/ppc/eldk-4.1.0/ppc_8xx/lib/libm.so.6
        libc.so.6 
=> /devel.rtl01/bist_devel/tools/ppc/eldk-4.1.0/ppc_8xx/lib/libc.so.6
        ld.so.1 
=> /devel.rtl01/bist_devel/tools/ppc/eldk-4.1.0/ppc_8xx/lib/ld.so.1

devel01:/devel/abts_devel/work/tom/tq_ramdisk # ppc_8xx-readelf -d 
new/bin/busybox |grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libcrypt.so.1]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]

Shouldn't the paths from ldd be for example /lib/libc.so.6 ?

Anybody has any idea what that could be?
I'll gladly provide any other information you'll need.

Thanks much in advance
Tom

On Thursday 29 March 2007 12:29, Wolfgang Denk wrote:
> In message <F1F6EC0C8B75034F9E3A79FC85122E8E71CD4A at aquib01a> you wrote:
> > Is it possible to avoid using libm in my roofs? Why a simple application
>
> Yes, this is possible.
>
> > always need it? Is it needed by libc or libstdc++?
>
> Simple applications don't need no libm. Neither  libc  nor  libstdc++
> per se require libm.
>
> It is your code and the library functions you call which causes such
> dependencies. Note that you have to be aware that even innocent
> looking calls like a
>
> 	printf ("Hello World\n");
>
> may be the culprits

-- 
Thomas Maenner
Engineering Project Manager
AEHR Test Systems
400 Kato Terrace
Fremont, CA 94539
Phone:  +1-510-623-9400x323
Cell:   +1-925-389-6653
Fax:    +1-510-623-9450
E-Mail: mailto:tmaenner at aehr.com



More information about the Linuxppc-embedded mailing list