Results 1 to 10 of 12
Hi all.
I've an ELF file (exec)...i'm interested in getting a the function prototype of the "myfunc"...
can you help me?...
- 10-18-2010 #1Just Joined!
- Join Date
- Apr 2010
- Posts
- 9
get the function's prototype from elf file
Hi all.
I've an ELF file (exec)...i'm interested in getting a the function prototype of the "myfunc"...
can you help me?
- 10-18-2010 #2Linux Newbie
- Join Date
- Mar 2010
- Posts
- 121
You can't retrieve the function prototype from an ELF file, with the possible exception of doing it through disassembly, but that would be tricky and error-prone.
You need a header file, really.
- 10-18-2010 #3Just Joined!
- Join Date
- Apr 2010
- Posts
- 9
a header file? i have only the elf file....
- 10-20-2010 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
It depends upon whether or not it has been stripped of debugging information. Is it a .o, .a, .so, or is it an executable file?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 10-20-2010 #5Just Joined!
- Join Date
- Apr 2010
- Posts
- 9
it's an exec file...i solved the problem....simply: the file is compiled with -g option so i can use a gdb "call" to see the prototype of my function :P
- 10-20-2010 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 10-20-2010 #7Just Joined!
- Join Date
- Apr 2010
- Posts
- 9
what? the exec's format is not ELF?
From wiki:Code:np2k@serena:~/Desktop$ file something.smt something.smt: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
I'm confusedIn computing, the Executable and Linkable Format (ELF, formerly called Extensible Linking Format) is a common standard file format for executables, object code, shared libraries, and core dumps
- 10-20-2010 #8Linux Newbie
- Join Date
- Mar 2010
- Posts
- 121
- 10-20-2010 #9Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
ELF is an intermediate format that is platform-neutral. The linker will take the ELF modules and convert them to binary machine-executable code. COFF (Common Object File Format) is another, older intermediate format that served the same purposes as ELF. It's possible (perhaps even likely) that the system loader can convert ELF modules dynamically to machine code. Since shared libraries are generally (on Linux at least) ELF modules, this actually makes sense. So, you executable may have been an ELF module. Without looking at it I can't say for sure.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 10-20-2010 #10Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
