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.