Re: exec format error

From: David Woodhouse (dwmw2@infradead.org)
Date: Mon Jun 11 2001 - 01:08:08 EST


sathish.j@tatainfotech.com said:
> I have written a file system in 2.2.14 kernel similar to ramfs on 2.5
> kernel. I am able to register,mount and do file and directory
> operations. I tried to write a C program and compile it. The
> compilation gave me the object file. When i tried to run the object
> file it gave me an error " cannot execute binary file". I entered gdb
> and I could get the error "exec format error". What is exec format
> error and what is it because of? Please help me out with this info.

Assuming you did compile an executable, not just try to execute the .o file,
then your filesystem probably corrupted the executable. Building and linking
programs stresses parts of the filesystem that your other tests cannot
reach. In particular, it does lots of seeking and writing to places other
than the end of the file, which isn't trivial to do from a shell script.

Try running the attached test program.

--
dwmw2


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 15 2001 - 21:00:13 EST