Hi all.
I've an ELF file (exec)...i'm interested in getting a the function prototype of the "myfunc"...
can you help me?
Printable View
Hi all.
I've an ELF file (exec)...i'm interested in getting a the function prototype of the "myfunc"...
can you help me?
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.
a header file? i have only the elf file....
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?
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
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 confused :confused:Quote:
In 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
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.