[BusyBox] can only execute from root directory
Brendan J Simon
brendan.simon at ctam.com.au
Mon Jul 29 20:27:03 UTC 2002
I previously posted a message saying that I can't execute programs that
are copied to tmpfs filesystem on /tmp. This message is erroneous. I
found that I can not execute any executable that is not in the root
directory. Well not 100% true. It seems that busybox (and symlinked
friends) work OK from any directory but my apps do not. I used readelf
to try and find some differences. It seems that the requesting program
interpreter is different.
My apps have: [Requesting program interpreter: lib/ld-uClibc.so.0]
Busybox has: [Requesting program interpreter: /lib/ld-uClibc.so.0]
Note the missing slash before "lib" which makes it an absolute path
rather than a relative path. I think this is the problem as the error
message I get when trying to run my apps from somewhere other than / is
"/usr/local/bin/myprog: No such file or directory"
I don't know why the / is missing. It must have something to do with
the install directory not being absolute when I built uClibc.
Any ideas ???
I can get around it with "-Wl,--dynamic-linker,/lib/ld-uClibc.so.0" but
it shouldn't really be necessary.
Cheers,
Bendan Simon.
More information about the busybox
mailing list