[uClibc]Invalid ELF header (MIPS) ??

zhangzr zrzhang at sedinfo.com.cn
Thu Mar 13 08:23:53 UTC 2003


----- Original Message ----- 
From: "zhangzr" <zrzhang at sedinfo.com.cn>
To: <andersen at codepoet.org>
Sent: Thursday, March 13, 2003 2:22 PM
Subject: Re: [uClibc]uClibc supporting shared libs on mipsel


> 
> ----- Original Message ----- 
> From: "Erik Andersen" <andersen at codepoet.org>
> To: "zhangzr" <zrzhang at sedinfo.com.cn>
> Sent: Thursday, March 13, 2003 11:59 AM
> Subject: Re: [uClibc]uClibc supporting shared libs on mipsel
> 
> 
> > On Thu Mar 13, 2003 at 11:58:35AM +0800, zhangzr wrote:
> > > i try it:
> > > such as :
> > > # /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-gcc ping.c -o ping
> > > # /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-ldd ./ping
> > >         libc.so.0 => /usr/mipsel-linux-uclibc/lib/libc.so.0 (0x00000000)
> > >         /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000)
> > > # ./ping 192.168.0.13
> > > sh: ./ping: No such file or directory
> > 
> > /lib/ld-uClibc.so.0 is missing.
> 
> i  rebuild uClibc.
> #make defconfig
> #make
> #make install
> 
> then i compile the helloworld like this:
> # /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-gcc -o helloworld helloworld.c
> # ./helloworld
> sh: ./helloworld: No such file or directory
> # /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-ldd ./helloworld
>         libc.so.0 => /usr/mipsel-linux-uclibc/lib/libc.so.0 (0x00000000)
>         /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000)
> 
> i found there is no ld-uClibc.so.0 in the /lib/.
> so i copy the ld-uClibc to /lib
> # cp /usr/mipsel-linux-uclibc/lib/ld-uClibc-0.9.19.so /lib/ld-uClibc.so.
> # ./helloworld
> Invalid ELF header
>  
> what's wrong with it ?

i  rebuild uClibc.
#make defconfig
#make
#make install
 
then i compile the helloworld like this:
# /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-gcc -o helloworld helloworld.c
# ./helloworld
sh: ./helloworld: No such file or directory
# /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-ldd ./helloworld
         libc.so.0 => /usr/mipsel-linux-uclibc/lib/libc.so.0 (0x00000000)
         /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000)

i found there is no ld-uClibc.so.0 in the /lib/.
so i copy the ld-uClibc to /lib
# cp /usr/mipsel-linux-uclibc/lib/ld-uClibc-0.9.19.so /lib/ld-uClibc.so.
# ./helloworld
Invalid ELF header
  
 what's wrong with it ?

> 
> > 
> >  -Erik
> > 
> > --
> > Erik B. Andersen             http://codepoet-consulting.com/
> > --This message was written using 73% post-consumer electrons--
> 


More information about the uClibc mailing list