From: "Vijay Padiyar" <vijay_padiyar@hotmail.com>
To: <dmarty@enib.fr>
Cc: LinuxPPC Support <linuxppc-embedded@ozlabs.org>
Subject: Re: Embedded linux on powerpc
Date: Fri, 1 Apr 2005 16:06:47 +0530 [thread overview]
Message-ID: <BAY1-DAV13A9814EECCF1E48C86E2D8B380@phx.gbl> (raw)
In-Reply-To: 20050401100354.70hbtqjfs33cos04@imp.enib.fr
Hi David
If your file was compiled statically (i.e. you gave the -static flag while
compiling & linking the file) then it will execute the application without
any problems.
If you have not used that flag (i.e. you're compiling your application using
dynamic library linking, which is preferrable) then you need to have the GNU
library and loader files (libc-2.3.3.so and ld-2.3.3.so and their symbolic
links, libc.so.6 and ld.so.6) in your target's /lib directory. You'll find
these in your toolchain's lib folder
(/home/yourname/tools/powerpc-603e-linux-gnu/lib). Copy these to your root
filesystem's lib directory.
Here is a snapshot of my root filesystem's /lib directory:
[chandrashekharp@linux lib]$ ls
ld-2.3.3.so libm-2.3.3.so libnss_files.so.2
libstdc++.so.6
ld.so.1 libm.so.6 libpthread-0.10.so
libstdc++.so.6.0.1
libc-2.3.3.so libnsl-2.3.3.so libpthread.so.0
libthread_db-1.0.so
libcrypt-2.3.3.so libnsl.so libresolv-2.3.3.so
libthread_db.so
libcrypt.so.1 libnsl.so.1 libresolv.so.2
libthread_db.so.1
libc.so.6 libnss_compat-2.3.3.so librt-2.3.3.so
libutil-2.3.3.so
libdl-2.3.3.so libnss_compat.so librt.so libutil.so.1
libdl.so.2 libnss_compat.so.2 librt.so.1 modules
libgcc_s.so libnss_files-2.3.3.so libstdc++.la
libgcc_s.so.1 libnss_files.so libstdc++.so
Similarly, you can copy whatever library files you require from your
toolchain's lib folder to your root filesystem's lib folder.
To find out which library files your executable needs, you need to do a
readelf on the executable and search for shared library dependencies:
~ $ powerpc-603e-linux-gnu-readelf -a hello | grep "Shared"
Executing this command will give you an output like this:
0x00000001 (NEEDED) Shared library: [libc.so.6]
This means hello needs libc.so.6 (libc-2.3.3.so) to execute properly. Next,
using the same command on libc.so.6 gives:
~ $ powerpc-603e-linux-gnu-readelf -a libc-2.3.3.so | grep "Shared"
0x00000001 (NEEDED) Shared library: [ld.so.1]
So libc-2.3.3.so needs ld.so.1 (ld-2.3.3.so) to work. I think you can copy
these two files to your root filesystem's /lib directory and your app should
execute fine.
Regards
Vijay Padiyar
http://www.vijaypadiyar.eu.tf
----- Original Message -----
From: <dmarty@enib.fr>
To: <vijay_padiyar@hotmail.com>
Sent: Friday, April 01, 2005 1:33 PM
Subject: Embedded linux on powerpc
> Hello,
>
> You wrote:
>
> >When I try to execute the resulting file on my target from the Linux
kernel
> >prompt, I get a message saying:
> >
> >/home # ./hello
> >/bin/sh: hello: File not found (or something like that)
>
> I have the same problem did you find a solution,
> thank you in advance for your response
>
> David
>
>
> ----------------------------------------------------------------
> The content of this message is only under the responsibility
> of its sender. Moreover, the internet can not guarantee the
> integrity of this message. The ENIB shall (will) not
> therefore be liable for the message if modified.
> ----------------------------------------------------------------
> Le contenu de ce message est de la seule responsabilite
> de son expediteur. De plus, l'internet ne permettant pas
> d'assurer l'integrite de ce message, l'ENIB decline toute
> responsabilite au titre de ce message, dans l'hypothese
> ou il aurait ete modifie.
>
>
parent reply other threads:[~2005-04-01 10:48 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20050401100354.70hbtqjfs33cos04@imp.enib.fr>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BAY1-DAV13A9814EECCF1E48C86E2D8B380@phx.gbl \
--to=vijay_padiyar@hotmail.com \
--cc=dmarty@enib.fr \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox