Currently when we dump dynamic relocation with use of DT_RELA/DT_RELASZ/DT_RELAENT tags, we crash when a symbol index is larger than the number of dynamic symbols or when there is no dynamic symbol table. This patch adds test cases and fixes the issues. Differential revision: https://reviews.llvm.org/D73560