This stops using RelocationRef API in the printStackSize method
and starts using the "regular" API that is used in almost all other places
in ELFDumper.cpp.
This is not only makes the code to be more consistent, but helps to diagnose
issues better, because the ELFObjectFile API, which is used
currently to implement stack sized dumping sometimes has a behavior
that just doesn't work well for broken inputs.
E.g see how it gets the symbol_end iterator. It will just not work
well for a case when the sh_size is broken.
template <class ELFT> basic_symbol_iterator ELFObjectFile<ELFT>::symbol_end() const { ... DataRefImpl Sym = toDRI(SymTab, SymTab->sh_size / sizeof(Elf_Sym)); return basic_symbol_iterator(SymbolRef(Sym, this)); }
Would --implicit-check-not=warning: be worthwhile?