support parsing of dynamic ELFs w/out section headers
At runtime, ELFs do not use the section headers at all. Instead, only
the program segments and dynamic tags get used. This means you can
strip the section table completely from an ELF and have it still work.
In practice, people rarely do this, but it's not unheard of. Make the
Dynamic tags work even in these cases by loading the strings table the
same way the runtime loader does:
* parse the symtab address from DT_STRTAB
* locate the file offset via the program segments
In order to avoid circular deps (parsing a dyntag requires walking parsed
dyntags), add a set of internal funcs for returning the raw values.
You can see this in action:
$ eu-strip -g --strip-sections a.out
$ readelf -S a.out
<nothing>
$ lddtree.py ./a.out
a.out (interpreter => /lib64/ld-linux-x86-64.so.2)
libïäöëß.so => None
libc.so.6 => /lib64/libc.so.6