lief-project / LIEF

LIEF - Library to Instrument Executable Formats
https://lief.re
Apache License 2.0
4.4k stars 611 forks source link

COFF object parse support #1091

Open novas0x2a opened 2 weeks ago

novas0x2a commented 2 weeks ago

Please describe what you would like to have in LIEF.

This is loosely related to #233, but I was wondering if there was a way to parse COFF objects of the sort that one might find in a .lib file on windows. One random one I'm testing with (after extracting with ar x) has a file magic of

zlibstatic.dir/Release/zutil.obj: Intel amd64 COFF object file, not stripped, 19 sections, symbol offset=0x601, 59 symbols, created Fri Aug 23 18:54:37 2024, 1st section name ".drectve"

I tried running lief.parse on it (from python, if that matters, with lief 0.15.1) and it reported Unknown format so I assume the file format isn't quite close enough.

romainthomas commented 2 weeks ago

Yes I would like to see this support in LIEF :)