Any libraries for reading and writing binary file formats (PE and ELF)?

Hello,

I want to write a binary file viewer for windows that can work with both PE and ELF files. Like those that already exist:

I have reasons why I want to write "another binary viewer."

Are there C libraries for reading PE and ELF file formats? I downloaded the source code for Gnu binutils and realized that it uses the Binary File Descriptor Library , which claims to support about 50 file formats for about 25 architecture processors. I'm not sure if it implements the full PE specifications, because basically it is a library for Linux, where the PE format is rarely used. Moreover, the source code of the library seems a bit complicated and redundant to me.

+3
source share
2 answers

I don’t know about C, but you can get inspiration from pefile , which is a pythonlibrary.

0

PeLib. ELF, , , PE .

0

Source: https://habr.com/ru/post/1750888/


All Articles