Fix crashing on corrupted ELF binaries with invalid offsets in ELF header.
Summary:
There are cases where ELF binaries are running fine, but have slightly
corrupted ELF headers, e.g., with section headers offset pointing beyond boundaries
of file. I'm guessing this is due to running strip or objdump with either some
particular combination of flags or some due to buggy version of those tools. This
change prevents from crashing on such files.
Reviewed By: yfeldblum
Differential Revision:
D6616027
fbshipit-source-id:
8cb3ac4475a51d1f1045c395977a6a77fbefffb2