forked from OSchip/llvm-project
8367b0750f
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. This change uses DT_HASH and DT_GNU_HASH to determine the size of .dynsym. Using hash tables to determine the number of symbols in .dynsym allows llvm-elfabi to work on binaries without relying on section headers. Differential Revision: https://reviews.llvm.org/D56031 llvm-svn: 352121 |
||
---|---|---|
.. | ||
Inputs | ||
binary-read-add-soname.test | ||
binary-read-arch.test | ||
binary-read-bad-soname.test | ||
binary-read-bad-vaddr.test | ||
binary-read-neededlibs-bad-offset.test | ||
binary-read-neededlibs.test | ||
binary-read-no-dt-strsz.test | ||
binary-read-no-dt-strtab.test | ||
binary-read-no-dynamic.test | ||
binary-read-replace-soname.test | ||
binary-read-soname-no-null.test | ||
binary-read-soname.test | ||
binary-read-syms-gnu-hash.test | ||
binary-read-syms-sysv-hash.test | ||
fail-file-open.test | ||
read-tbe-as-elf.test | ||
read-tbe-as-tbe.test | ||
read-unsupported-file.test | ||
tbe-emits-current-version.test | ||
tbe-read-basic.test |