I am trying to extract information like function name and its parameters from elf file, with the goal to perform robustness testing by changing the parameter values for functions, I am working on windows environment and the elf file I want to instrument is for powerPC architecture, I tried using opensource tool DynInst http://www.dyninst.org/ which can be built on MS Visual Studio, but it instruments binaries compiled with cl compiler (exe and dll formats), I have the following questions to pose:
1) Is it possible to use Microsoft Visual studio c++ compiler to produce elf file, so that I can use DynInst to instrument the binary?
2) Is there any other means or tools that can be used to extract and instrument elf files on windows platform?
objdump, readelf, nm etc provide features for extracting elf, but my need is to also instrument them. I dont know how to tailor these utilities to meet my needs, any suggestions would be of great help!
/Thanks
1) Is it possible to use Microsoft Visual studio c++ compiler to produce elf file
Sure: ELF
is just a file format. Just like you can write a .zip file on PowerPC/AIX and read it on a SPARC/Solaris and x86/Windows, so you can write an ELF file on any OS.
so that I can use DynInst to instrument the binary?
Whether DynInst
will be able to instrument such a file I have no idea.
Is there any other means or tools that can be used to extract and instrument elf files on windows platform?
You can compile the GNU binutils
package, which contains readelf
. You can use it to extract all kinds of info from the ELF
file.
There is also libelf
library, which allows you to read and write ELF files. Whether libelf
can be built on Windows without too much trouble, I don't know.