On Oct 28, 8:52 am, KevinD <[email protected]> wrote:
> I have built a helloworld application using NDK. It works fine in
> emulator and target.
>
> If I load it to Debian system (armv5te), it would execute:
>
> ./helloworld
> -bash: ./helloworld: No such file or directory

The Android NDK does various things different than a 'normal' cross-
compiled executable.
- It links against Bionic libc, not glibc. Bionic libc is a smaller
version (reimplementation) of GNU libc. Just changing the library path
will not work here, because all symbols are not correct in the
executable (it is a different library!)
- For binaries that use the Bionic libc library dynamically, there is
an Android specific linker /system/bin/linker on Android.
- Android uses alternative crtbegin and crtend, object files are
delivered with the NDK.

Therefore it is not one-to-one compatible with a normal Debian system.
Why would you like to use the Android build system, to build an
executable for a non-Android OS? You'd better use a normal
(cross-)compiler with your own (simple) Makefile.

The 'No such file or directory' message can explain that the dynamic
linking is not working properly.

Regards,
Hubert

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to