elf: detect FreeBSD via note

This commit is contained in:
William Ballenthin
2021-08-18 14:21:50 -06:00
parent f1df29d27e
commit a35f5a1650

View File

@@ -188,6 +188,9 @@ def detect_elf_os(f: BinaryIO) -> str:
elif name == "NetBSD":
logger.debug("note owner: %s", "NETBSD")
ret = OS.NETBSD if not ret else ret
elif name == "FreeBSD":
logger.debug("note owner: %s", "FREEBSD")
ret = OS.FREEBSD if not ret else ret
for i in range(e_phnum):
offset = i * e_phentsize