[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] Help! Booting NFS with ARM using shared libraries
From:       yukwing.li () conexant ! com
Date:       2003-04-23 2:27:23
[Download RAW message or body]

This is a multipart message in MIME format.
--=_alternative 000D7E6488256D11_=
Content-Type: text/plain; charset="us-ascii"

Hi Erik,

I have finally figured out why my busybox cannot be loaded dynamically. 
The problem was my cross-built glibc libraies.  When I do readelf on 
libc.2.2.3.so, it says "requesting program interpreter: 
/usr/local/arm/3.2.2//lib/ld-linux.so.s"in stead of "/lib/ld-linux.so.2". 
If I make a symbolic link from my <nfs root>/usr/local/arm/3.2.2/lib to 
<nfs root>/lib, everything will work just fine.

I guess my problem was caused by the way I cross-build the ARM glibc.  I 
use "/usr/local/arm/3.2.2/" as the prefix.  Do you know how I can get 
around this?

Thanks for you help!

Yuk-Wing Li





"Erik Andersen" <andersen@codepoet.org>
04/16/2003 07:18 PM
Please respond to andersen

 
        To:     yukwing.li@conexant.com
        cc:     busybox@busybox.net
        Subject:        Re: [BusyBox] Help! Booting NFS with ARM using shared \
libraries


On Wed Apr 16, 2003 at 07:00:22PM -0700, yukwing.li@conexant.com wrote:
> Hi Erik,
> 
> Thanks for the info. 
> 
> My problem is that I am trying to figure out why Busybox cannot start 
> (with the error "init: error while loading shared libraries: libc.so.6: 
> cannot open shared object file") in my ARM platform.  The 'ldd' command 
in 
> my i386 platform is not capable of recognizing ARM or MIPS executables. 
It 
> sounds like I need to find the source of ldd and build an ARM version of 

> it, and then use a static version of Busybox to boot up my ARM platform 
in 
> order to run 'ldd' on the dynamic version of Busybox to see what other 
> libraries are needed.  Is that what are you suggesting?

You could use the uClibc version of 'ldd', or you could use
readelf, i.e.:

$ file ./busybox 
./busybox: ELF 32-bit LSB executable, ARM, version 1 (ARM), for
GNU/Linux 2.0.0, dynamically linked (uses shared libs), stripped

$ readelf -a ./busybox | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libc.so.0]

 -Erik

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




--=_alternative 000D7E6488256D11_=
Content-Type: text/html; charset="us-ascii"


<br><font size=2 face="sans-serif">Hi Erik,</font>
<br>
<br><font size=2 face="sans-serif">I have finally figured out why my busybox cannot \
be loaded dynamically. &nbsp;The problem was my cross-built glibc libraies. \
&nbsp;When I do readelf on libc.2.2.3.so, it says &quot;requesting program \
interpreter: /usr/local/arm/3.2.2//lib/ld-linux.so.s&quot;in stead of \
&quot;/lib/ld-linux.so.2&quot;. &nbsp;If I make a symbolic link from my &lt;nfs \
root&gt;/usr/local/arm/3.2.2/lib to &lt;nfs root&gt;/lib, everything will work just \
fine.</font> <br>
<br><font size=2 face="sans-serif">I guess my problem was caused by the way I \
cross-build the ARM glibc. &nbsp;I use &quot;/usr/local/arm/3.2.2/&quot; as the \
prefix. &nbsp;Do you know how I can get around this?</font> <br>
<br><font size=2 face="sans-serif">Thanks for you help!</font>
<br>
<br><font size=2 face="sans-serif">Yuk-Wing Li</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>&quot;Erik Andersen&quot; \
&lt;andersen@codepoet.org&gt;</b></font> <p><font size=1 face="sans-serif">04/16/2003 \
07:18 PM</font> <br><font size=1 face="sans-serif">Please respond to andersen</font>
<br>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; &nbsp; \
&nbsp; &nbsp;yukwing.li@conexant.com</font> <br><font size=1 face="sans-serif">&nbsp; \
&nbsp; &nbsp; &nbsp; cc: &nbsp; &nbsp; &nbsp; &nbsp;busybox@busybox.net</font> \
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject: &nbsp; &nbsp; \
&nbsp; &nbsp;Re: [BusyBox] Help! Booting NFS with ARM using shared \
libraries</font></table> <br>
<br>
<br><font size=2 face="Courier New">On Wed Apr 16, 2003 at 07:00:22PM -0700, \
yukwing.li@conexant.com wrote:<br> &gt; Hi Erik,<br>
&gt; <br>
&gt; Thanks for the info. <br>
&gt; <br>
&gt; &nbsp;My problem is that I am trying to figure out why Busybox cannot start <br>
&gt; (with the error &quot;init: error while loading shared libraries: libc.so.6: \
<br> &gt; cannot open shared object file&quot;) in my ARM platform. &nbsp;The 'ldd' \
command in <br> &gt; my i386 platform is not capable of recognizing ARM or MIPS \
executables. It <br> &gt; sounds like I need to find the source of ldd and build an \
ARM version of <br> &gt; it, and then use a static version of Busybox to boot up my \
ARM platform in <br> &gt; order to run 'ldd' on the dynamic version of Busybox to see \
what other <br> &gt; libraries are needed. &nbsp;Is that what are you suggesting?<br>
<br>
You could use the uClibc version of 'ldd', or you could use<br>
readelf, i.e.:<br>
<br>
$ file ./busybox <br>
./busybox: ELF 32-bit LSB executable, ARM, version 1 (ARM), for<br>
GNU/Linux 2.0.0, dynamically linked (uses shared libs), stripped<br>
<br>
$ readelf -a ./busybox | grep NEEDED<br>
 0x00000001 (NEEDED) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; Shared library: [libc.so.0]<br> <br>
 -Erik<br>
<br>
--<br>
Erik B. Andersen &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
                http://codepoet-consulting.com/<br>
--This message was written using 73% post-consumer electrons--<br>
<br>
</font>
<br>
<br>
--=_alternative 000D7E6488256D11_=--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic