1

I am pretty new to cross compilation and I am not sure whether the executable which is getting created through cross compilation is correct or not.

Basically I am working on project which needs the libs to be compiled from different toolchains.

So I have compiled a library on ubuntu system using a arm toolchain and the library is compiled successfully. But now on ubuntu when I try to perform ldd on its arm executable, it shows a message "not a dynamic executable".

However this same library which is compiled from another qnap x86_64 toolchain works fine on performing ldd on its executable. I mean it shows proper dependecies as expected by ldd.

Now I am confused which one is the expected behavior. The one which is showing dependecies from ldd or the one which is showing "not a dynamic executable".

Could someone please clarify this concept to me?

Thanks

Neeraj Kumar
  • 836
  • 1
  • 10
  • 29
  • 2
    Does your ARM toolchain include a 'ldd' command of its own? Generally speaking, anything you want to do with a cross-compiled program has to be done with the appropriate toolchain, not your native tools. If there's no 'ldd', try 'objdump' instead. – jasonharper Oct 26 '16 at 03:44
  • Idd is present in toolchain. But this ldd also showing message as not a dynamic executable. – Neeraj Kumar Oct 26 '16 at 03:58
  • Do these help? https://stackoverflow.com/questions/6150000/cross-compiler-ldd https://stackoverflow.com/questions/10052041/how-to-list-library-dependencies-of-a-non-native-binary – domen Oct 26 '16 at 12:18
  • @domen Thanks.. this link is informative. However my question is to confirm which behavior is correct. When the host ldd is showing dependencies of target executable or when host ldd is showing "not an executable" msg for target executable? – Neeraj Kumar Oct 27 '16 at 10:40

0 Answers0