Files
lief-project-LIEF/api/python/examples/macho_parser_tweak.py
T
Romain Thomas 9da2466609 Improve the LIEF Python build system by using pyproject.toml
- It also provides typing info (close #650)
- Enhance the test suite
- Remove deprecated PE functions
2023-02-19 20:19:03 +01:00

24 lines
463 B
Python

import lief
import sys
import time
# Do not parse dyld info
config = lief.MachO.ParserConfig()
config.parse_dyld_bindings = False
config.parse_dyld_exports = False
config.parse_dyld_rebases = False
t1 = time.time()
lief.MachO.parse(sys.argv[1], config)
t2 = time.time()
print(f"Done in {t2 - t1}s")
# Parse the dyld information
config.full_dyldinfo(True)
t1 = time.time()
lief.MachO.parse(sys.argv[1], config)
t2 = time.time()
print(f"Done in {t2 - t1}s")