Hello Sid<div><br></div><div>I checked the binary with "readelf -l" and you are right. Originally, it pointed the one of the host system. It has to be the one of the target system. This is why the option Wl,-dynamic-linker,path_to_target_dynamic_loader is needed.</div>
<div><br></div><div>I understood this issue now.</div><div>Thank you very much!</div><div><br></div><div>Regards</div><div><br></div><div>Journeyer J. Joh</div><div><br><br><div class="gmail_quote">2012/6/27 Sid Manning <span dir="ltr"><<a href="mailto:sidneym@codeaurora.org" target="_blank">sidneym@codeaurora.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 06/27/12 07:24, Journeyer J. Joh wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
With your kind concern and help, I now can make a binary for ARM target.<br>
<br>
./clang -v --save-temps -ccc-host-triple arm-none-linux-gnueabi<br>
--sysroot=/home/hum/Documents/<u></u>Projects/arm_toolchain/arm-<u></u>2010.09/arm-none-linux-<u></u>gnueabi/libc<br>
-gcc-toolchain /home/hum/Documents/Projects/<u></u>arm_toolchain/arm-2010.09<br>
hello.c -o hello<br>
<br>
The build command is shown above.<br>
<br>
After that, I prepared an ARM laptop, AC100 - TOSHIBA.<br>
I installed Ubuntu 12.04 in the way guided from the link below.<br>
<br>
<a href="https://wiki.ubuntu.com/ARM/TEGRA/AC100" target="_blank">https://wiki.ubuntu.com/ARM/<u></u>TEGRA/AC100</a><br>
<br>
So I moved the final binary from host PC to AC100 and executed.<br>
But the binary DIDN'T RUN.<br>
<br>
$./hello<br>
<br>
returns an error message below.<br>
<br>
bash: ./hello: No such file hello<br>
<br>
</blockquote>
<br></div>
You could try readelf -l hello and check the INTERP header.  When I've seen this message usually PT_INTERP points to something that the kernel can't find.<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I need to understand why it doesn't run on ARM laptop.<br>
<br>
I compiled another sample program hi.c on the ARM laptop and compared<br>
both - the one cross compiled "hello" and the other self host compiled "hi".<br>
<br>
Output message of utility "file" is almost the same except Linux<br>
version, one is 2.6.16 and the other is 2.6.31. But the output of "ldd"<br>
shows something meaningful.<br>
</blockquote>
<br></div>
This is curious based on the output from ldd below, does file report each as, "dynamically linked".<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
ldd hi<br>
     libc.so.6 => /lib/arm-linux-gnueabihf/libc.<u></u>so.6 (0xb6ecf000)<br>
     /lib/ld-linux-armhf.so.3 (0xb6fc3000)<br>
<br>
ldd hello<br>
     not a dynamic executable<br>
<br>
<br>
</blockquote>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>----------------------------------------</div><div>Journeyer J. Joh</div><div>o o s a p r o g r a m m e r</div><div>a t</div><div>g m a i l  d o t  c o m</div>
<div>----------------------------------------</div><br>
</div>