We might crash when the dynamic symbols table is empty and --hash-symbols
is requested. Both .hash and .gnu.hash logic is affected.
The patch fixes this issue.
| Paths 
 |  Differential  D83037  
[llvm-readobj] - Fix a crash scenario in GNUStyle<ELFT>::printHashSymbols(). ClosedPublic Authored by grimar on Jul 2 2020, 4:34 AM. 
Details Summary We might crash when the dynamic symbols table is empty and --hash-symbols The patch fixes this issue. 
Diff Detail 
 Event Timeline
 grimar marked 3 inline comments as done.Comment Actions 
 
 This revision is now accepted and ready to land.Jul 7 2020, 1:26 AM Closed by commit rGd5cbf7ba3252: [llvm-readobj] - Fix a crash scenario in GNUStyle<ELFT>::printHashSymbols(). (authored by grimar).  ·  Explain WhyJul 7 2020, 2:07 AM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
 
Diff 275948 llvm/test/tools/llvm-readobj/ELF/hash-symbols.test
 llvm/tools/llvm-readobj/ELFDumper.cpp
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
to produce -> return
(I think it reads cleaner that way. It would be just "produce" anyway).