Hi, thanks for your answer.

I found out that all my attempts to try to build the oprofile tools for the Android device was not necessary. Google has already done this for me ^^ and if had done my homework properly I would have known this. There is no documentation of it but the tools are there when you take a closer look after the Android source has been built. The only thing that was required to do was to build the kernel with profiling on.

Never found out what was wrong with my own cross-compiles but I believe it had something to do with the shared libraries since the statically linked oprofiled bin worked.


2009/5/5 Richard Purdie <rpurdie@rpsys.net>
On Tue, 2009-05-05 at 09:03 -0500, Maynard Johnson wrote:
> Magnus Johansson wrote:
> > After modification I tried to run the script again and it wants to execute
> > "ophelp". Now, ophelp can not be executed :(
> > If I try to execute from the shell it says: "./ophelp: not found" (yes
> > x-flag is set). I figured that it was built for another platform but "file"
> > returns:
> >
> > ophelp: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux
> > 2.6.14, dynamically linked (uses shared libs), not stripped
> >
> > which seems to be correct. I then thought that I was missing some shared
> > libraries. I checked ophelps dependencies and believe that it depends on
> > "libc", "libld". These are located in library path on target. Although they
> > are not the complete versions of the libraries since Google reduced them.
> > Don't think that should be a problem since ophelp doesn't seem to use any
> > specifics.
> >
> > Note that this is the same problem for all dynamically linked executables
> > (ophelp, opannotate etc). oprofiled which is a statically linked app works
> > fine!
> >
> > Comments? Advice? Anything..

Obviously something is seriously wrong with your cross compiled binaries
and shared library setup. What does "objdump -x" on the ophelp binary
report? How does it compare to other working binaries on your system?
Does "strace ./ophelp" show anything interesting? Is your corss
compiling toolchain producing working binaries for other software