[PATCH] D66532: [yaml2obj] - Lookup relocation symbols in dynamic symbol when .dynsym referenced.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 06:55:36 PDT 2019
grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: seiya, rupprecht.
grimar marked an inline comment as done.
grimar added inline comments.
================
Comment at: lib/ObjectYAML/ELFEmitter.cpp:1001
WithColor::error() << "Local symbol '" + Name +
"' after global in Symbols list.\n";
return false;
----------------
btw, since this code is now used for dynamic symbols and yaml2obj is
generally a tool that makes possible to produce the broken binaries,
perhaps I'd try to remove this restriction logic for both regular and dynamic symbols
in a follow up.
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 <https://reviews.llvm.org/D59097> by James Henderson
https://reviews.llvm.org/D66532
Files:
lib/ObjectYAML/ELFEmitter.cpp
test/tools/llvm-readobj/demangle.test
test/tools/yaml2obj/dynamic-relocations.yaml
test/tools/yaml2obj/dynamic-symbols.yaml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66532.216389.patch
Type: text/x-patch
Size: 6331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190821/c33c7ed9/attachment.bin>
More information about the llvm-commits
mailing list