Skip to content

Commit

Permalink
Adjust to LIEF >= 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Feb 12, 2024
1 parent 7427b2f commit c3d402b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/symbol-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ def check_MACHO_exported_functions(library, expected_exports) -> bool:
return ok

CHECKS = {
lief.EXE_FORMATS.ELF: [
lief.Binary.EXE_FORMATS.ELF: [
('EXPORTED_SYMBOLS', check_ELF_exported_symbols),
],
lief.EXE_FORMATS.PE: [
lief.Binary.EXE_FORMATS.PE: [
('EXPORTED_FUNCTIONS', check_PE_exported_functions),
],
lief.EXE_FORMATS.MACHO: [
lief.Binary.EXE_FORMATS.MACHO: [
('EXPORTED_FUNCTIONS', check_MACHO_exported_functions),
]
}
Expand All @@ -108,8 +108,8 @@ def check_MACHO_exported_functions(library, expected_exports) -> bool:

try:
library: lief.Binary = lief.parse(filename)
exe_format: lief.EXE_FORMATS = library.format
if exe_format == lief.EXE_FORMATS.UNKNOWN:
exe_format: lief.Binary.EXE_FORMATS = library.format
if exe_format == lief.Binary.EXE_FORMATS.UNKNOWN:
print(f'{filename}: unknown executable format')
sys.exit(1)

Expand Down

0 comments on commit c3d402b

Please sign in to comment.