[PATCH] D56031: [elfabi] Add support for reading dynamic symbols from binaries
Armando Montanez via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 21 15:07:07 PST 2018
amontanez created this revision.
amontanez added reviewers: jakehehrlich, phosek, mcgrathr.
Herald added a subscriber: llvm-commits.
This patch adds initial support for reading dynamic symbols from ELF binaries. Currently, STT_NOTYPE, STT_OBJECT, STT_FUNC, and STT_TLS are explicitly supported. Other symbol types are mapped to ELFSymbolType::Unknown to improve signal/noise ratio.
Symbols must meet two criteria to be read into in an ELFStub:
- The symbol's binding must be STB_GLOBAL or STB_WEAK.
- The symbol's visibility must be STV_DEFAULT or STV_PROTECTED.
This filters out symbols that aren't of interest during compile-time linking against a shared object.
Repository:
rL LLVM
https://reviews.llvm.org/D56031
Files:
llvm/test/tools/llvm-elfabi/binary-read-arch.test
llvm/test/tools/llvm-elfabi/binary-read-bad-soname.test
llvm/test/tools/llvm-elfabi/binary-read-neededlibs.test
llvm/test/tools/llvm-elfabi/binary-read-soname-no-null.test
llvm/test/tools/llvm-elfabi/binary-read-soname.test
llvm/test/tools/llvm-elfabi/binary-read-syms.test
llvm/test/tools/llvm-elfabi/replace-soname-tbe.test
llvm/tools/llvm-elfabi/ELFObjHandler.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56031.179360.patch
Type: text/x-patch
Size: 14429 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181221/7ae14ab0/attachment.bin>
More information about the llvm-commits
mailing list