[Clfs-support] CLFS for ppc on LFS 6.3 host
Joe Ciccone
jciccone at gmail.com
Wed Jul 9 15:09:15 PDT 2008
Anthony Drake wrote:
> Ken, Joe,
>
> Good news: hello world program compiled with CLFS cross compiler runs
> on one of the targets that has a 2.6 kernel installed.
>
> It will only run when compiled with the -static switch to gcc, and
> it's 2.5M in size:
>
> v4 at v4-130 <mailto:v4 at v4-130>: [~]#ls -al
> drwx------ 2 v4 users 1024 Jul 9 14:33 .
> drwxr-xr-x 3 root root 1024 May 22 16:55 ..
> -rw------- 1 v4 users 88 Jul 9 14:26 .bash_history
> -rwxr-xr-x 1 v4 users 2600205 Jul 10 2008 hello
> -rwxr-xr-x 1 v4 users 3022 Jul 10 2008 helloworld
> -rwxr-xr-x 1 v4 users 12143 Jul 10 2008 hw
>
> hello is linked with -static:
> v4 at v4-130 <mailto:v4 at v4-130> [~]# ./hello
> Hello world
>
> hw is linked without -static:
> v4 at v4-130 <mailto:v4 at v4-130> [~]# ./hw
> -bash: ./hw: No such file or directory
This is most likely because your prog has the wrong path of ld.so
embedded in it. If you get a target binary, run this command on it and
compare it to your shared hello world binary.
readelf -l [binary path] | grep interpreter
More information about the Clfs-support
mailing list