aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/XCOFFObjectFile.cpp
diff options
context:
space:
mode:
authorGeorgii Rymar <grimar@accesssoftek.com>2020-11-17 16:15:45 +0300
committerGeorgii Rymar <grimar@accesssoftek.com>2020-11-24 11:49:00 +0300
commit245052ac3080681915c4da59e871d43ea583debb (patch)
treebdc6152adaa67f85ad9881211e75e806ac4dd92d /llvm/lib/Object/XCOFFObjectFile.cpp
parent50bd686695ac2ca25996be7994808f93a2b753c5 (diff)
downloadllvm-245052ac3080681915c4da59e871d43ea583debb.zip
llvm-245052ac3080681915c4da59e871d43ea583debb.tar.gz
llvm-245052ac3080681915c4da59e871d43ea583debb.tar.bz2
[llvm-readelf/obj] - Improve the error reporting in printStackSize().
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)); } ``` Differential revision: https://reviews.llvm.org/D91624
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions