what does "ldd hello" say?
ldd for the 32 bit version returns:
$ ldd hello32
linux-gate.so.1 => (0xf777c000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf75b5000)
for the 64 bit version:
$ ldd hello64
linux-vdso.so.1 => (0x00007fffc03fe000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbf5ac88000)
I guess I misunderstood.
My understanding was: You are running a Yocto Linux on Galileo and you are cross compiling for that Linux and you are trying to run the generated executable "hello" on Galileo.
- if you are cross-compiling for Galileo you will not get a 64 bit executable
- if your are checking "ldd hello" on Galileo you wouldn't see the libs for 64 bit
moreover you should see the libs in /lib/ not in /lib/<arch>/
So I'm honestly slightly puzzled what you are doing and trying to attempt. Could you pls clarify?
Your understanding was correct! My last post was probably a bit ambiguous.
The ldd command isn't recognised on the Galileo (apparently the image I flashed onto it is missing the packages). I'm reflashing a new image on the board, which might solve the problem.
The libraries returned above were from my dev machine and not the Galileo. I compiled the 64 bit executable because, as I explained in my first post, the Yocto is able to find the 64 bit version if I try to execute it, just says that it can't execute the binary whereas for the 32 bit version it says it cannot find the file if I try to execute it.
I hope this post makes more sense than my earlier one did, and I'll post an update as soon as I reflash the image.