[llvm-readobj] - Improve dumping of the SHT_LLVM_LINKER_OPTIONS sections.
authorGeorgii Rymar <grimar@accesssoftek.com>
Tue, 12 Nov 2019 09:46:44 +0000 (12:46 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Wed, 20 Nov 2019 09:11:13 +0000 (12:11 +0300)
commit19ddba95513af4e673ce6724e3a87077c278354c
tree53b95fadf9ea9b5bac15b00bd32bc10deb4fe959
parentce1f95a6e077693f93d8869245f911aff3eb7e4c
[llvm-readobj] - Improve dumping of the SHT_LLVM_LINKER_OPTIONS sections.

I've added a few tests that shows how the current code could overrun the section data
buffer while dumping. I had to rewrite the code to fix this.

Differential revision: https://reviews.llvm.org/D70112
llvm/test/tools/llvm-readobj/elf-linker-options.test
llvm/tools/llvm-readobj/ELFDumper.cpp