views:

60

answers:

2

HellO,

I want to write a binary file format viewer for windows which can operate on both PE & ELF files. Similar to the ones already there:

I've reasons why I want to write "yet another binary viewer".

Are there any C libraries for reading PE & ELF file formats? I've downloaded Gnu binutils's source code and figured out that it uses Binary File Descriptor Library which claims to support approximately 50 file formats for some 25 processor architectures. I'm not sure if it implements the complete PE specifications because its basically a library for Linux where PE format is rarely used. Moreover, the library source code seems to be little complex and redundant for me.

+1  A: 

I don't know about C, but you might get your inspiration from pefile, which is a python library.

the_void
A: 

Also take a look at PeLib. It can't handle ELF but at least it could help handle the PE format for you.

Victor T.