LIEF
LIEF copied to clipboard
Lazy loading to improve LIEF parsing performance
Describe the bug LIEF parsing tend to be very slow on huge binaries. For example printing whether pandoc binary (118 MB) has NX takes 48 seconds ! :fearful:
To Reproduce Steps to reproduce the behavior:
apt-get install pandoctime python -c "import lief; binary = lief.parse('/usr/bin/pandoc'); print(binary.has_nx)"

Expected behavior This operation should take only a few hundred milliseconds to complete.
Environment (please complete the following information):
- System and Version : Ubuntu 20.04
- Target format ELF
- LIEF commit version:
0.10.1-bfe5414
Additional context I'm writing a Python implementation of checksec.sh based on LIEF, and so far the performance is my main issue.
thanks !