[yaml2obj] - Lookup relocation symbols in dynamic symbol when .dynsym referenced.
commitaf5572f1022bf43307563b4f515376f111dd4a97
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 22 Aug 2019 12:39:56 +0000 (22 12:39 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 22 Aug 2019 12:39:56 +0000 (22 12:39 +0000)
treef430de966c2dc691907a206cd266a1f83897b447
parent52c6387dd2fb89d357db7bc3c7ced354ec8b97b0
[yaml2obj] - Lookup relocation symbols in dynamic symbol when .dynsym referenced.

This fixes https://bugs.llvm.org/show_bug.cgi?id=40337.

Previously, it was always assumed that relocations referenced symbols in the static symbol table.
Now, if the Link field references a section called ".dynsym" it will look up these symbols
in the dynamic symbol table.

This patch is heavily based on D59097 by James Henderson

Differential revision: https://reviews.llvm.org/D66532

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369645 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ObjectYAML/ELFEmitter.cpp
test/tools/llvm-readobj/demangle.test
test/tools/yaml2obj/dynamic-relocations.yaml [new file with mode: 0644]
test/tools/yaml2obj/dynamic-symbols.yaml