Hello David J, On Mon, 20 Jul 2015 04:15:35 +0000, Chou, David J <david.j.c...@intel.com> wrote: > Hello Albert, > > Thanks for your quick response. The error message disappeared after I > switched to use gcc-linaro-aarch64-linux-gnu-4.8-2014.04_linux tool chain > from Linaro in either u-boot-2015.07-rc2 branch or latest u-boot-2015.07 > branch. > > I have one question: why the following build generated a statically linked > u-boot as showed by "$ file u-boot" followed, and also it doesn't show "ARM" > after " u-boot: ELF 64-bit LSB shared object," : > $ make distclean > $ make vexpress_aemv8a_juno_defconfig ARCH=arm > CROSS_COMPILE=aarch64-linux-gnu- > $ make all ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- > $ file u-boot > u-boot: ELF 64-bit LSB shared object, version 1 (SYSV), statically linked, > not stripped > > But when I built a 32-bit arm u-boot using following command, it generated a > dynamically linked u-boot, and "file u-boot" shows "ARM" after " u-boot: > ELF 32-bit LSB shared object,": > $ make distclean > $ make vexpress_ca15_tc2_defconfig ARCH=arm CROSS_COMPILE=arm-eabi- > $ make all ARCH=arm CROSS_COMPILE=arm-eabi- > $ file u-boot > u-boot: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically > linked (uses shared libs), not stripped
> Is there anything wrong in my commands (shown in following" again to make a > 64 bit aarch64 u-boot, what commands you use to generated 64 bits u-boot ? > $ make distclean > $ make vexpress_aemv8a_juno_defconfig ARCH=arm > CROSS_COMPILE=aarch64-linux-gnu- > $ make all ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- > > Is the 64bits u-boot you generated statically linked or dynamically linked > when you use "file u-boot" to check it? Does "file u-boot" show "ARM" after " > u-boot: ELF 64-bit LSB shared object,"? Can you show the "file u-boot" > result for your 64 bit u-boot? Actually, 'file' is simpy wrong. U-boot is statically linked. U-Boot could not be dynamically linked, since U-Boot does not run above an OS that could provide dynamic libraries. After all, it is U-Boot's role to get such an OS to boot. Also, while your 'file' cannot recognize the AARCH64 file, mine can: u-boot: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped See? "ARM aarch64". So how come yours does not? It's all about the database of signatures that the 'file' command uses. mine has the signature for "ARM aarch64", yours does not. And both yours and mine wrongly find a "dynamically linked" signature in 32-bit ARM u-boot. If you want to check this, copy the 32-bit u-boot ELF file over to an ARM 32-bit target running Linux, an do an 'ldd u-boot'. This should show you the libraries if u-boot was really dynamic. But it won't (on my OpenRD-Client it fails with "unknown exit code" 139). Compare this with, say, 'ldd /bin/bash', which lists the five libraries bash needs. So the thing is, you're trusting 'file', and you should not. :) > Thanks. No problem. > Best Regards, > David Chou Amicalement, -- Albert. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot