I think there are a couple of interesting things that can be done if lief is imported; the current elf tables could be merged into the new ones and have a more generic "executable_sections" with an additional column that contains the image type (elf, pe, ...)