Can't run my own programs ?!

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View

I've got a basic system running using Busybox and Tinylogin, but I can't
seem to run my own programs.

In the example below my program is called 'hesc', but as you can see,
the system says the file doesn't exist. What is going on ?

# pwd
/tmp
# ls -l
-rwxrwxrwx    1 0        0              25 May  9 10:14 a
-rwxr-xr-x    1 0        0           14883 May  9 10:16 hesc
# ./hesc
./hesc: No such file or directory
# ls -l ./hesc
-rwxr-xr-x    1 0        0           14883 May  9 10:16 ./hesc
#



Re: Can't run my own programs ?!
snipped-for-privacy@noreply.org writes:

Quoted text here. Click to load it

This is usually an indication that the dynamic loader which is
supposed to load your program doesn't exist. E.g.

$ echo 'int main() { printf("Hello\n"); return 0; }' > junk.c &&
  gcc -g junk.c && ./a.out
Hello

$ gcc -g -Wl,-dynamic-linker=/no/such/file junk.c && ./a.out
bash: ./a.out: No such file or directory

$ ls -l a.out
-rwxrwxr-x    1 paul     users       13836 May  9 08:14 a.out

You can find out which dynamic linker your program was compiled to
use with:

$ objdump -sj.interp ./a.out
...
Contents of section .interp:
 80480f4 2f6e6f2f 73756368 2f66696c 6500      /no/such/file.  

Quoted text here. Click to load it

Another possibility (not very likely) is that /tmp is mounted with
noexec option.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

Re: Can't run my own programs ?!

You are right..It's now working, but the image is HUGE. I think it's about
time I started using shared libraries instead of building things -static.

Thanks again.


Paul Pluzhnikov wrote:

Quoted text here. Click to load it


Re: Can't run my own programs ?!
Quoted text here. Click to load it

Are you sure you are root when you are trying this? The hesc and a files
are both root:root (the two 0's indicate that).

Good luck,
Freddy


Site Timeline