Implement method to read elf data from memory.
I rewrote the entirety of elfxx.h/elfxx.c to support this.
For the rewrite, I modified the way that the symbol tables are searched.
The searched every single entry in the symbol table, and all symbol tables.
The new method finds the first entry that actually has a name and stops.
I also added some quick checks to make sure that a malformed elf would
not cause a crash when reading the symbol names from the symbol tables.
I had to implement the functionality of dwarf_find_unwind_table to handle
reading from memory, instead of from a file. I didn't implement debug frame
support since that likelihood of that appearing in memory seems low.
I also modified the dwarf_find_unwind_table to remove an abort and just
fail if that particular path is encountered. In addition, I added a quick
check to make sure that a malformed dynamic section doesn't cause a crash.
(cherry picked from commit ae38b20031a02d3f6f56a8315c1f097ae5293c56)
32 files changed