Currently libelf
declines to process ELF objects which are malformed. For example, elf32_getehdr()
will fail if an object has an invalid ELF header.
The downside of this stance is that tools such as readelf
built using our libelf
will be unable to process a damaged ELF object.
Consider adding an ELF_F_INVALID
flag that signals that the content of an ELF data structure is incomplete or invalid in some way, and permit libelf
's APIs to return such "invalid" structures.