1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test/tools/llvm-elfabi
Armando Montanez c38aa8169e [elfabi] Add support for reading dynamic symbols from binaries
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
2019-01-24 22:39:21 +00:00
..
Inputs [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
binary-read-add-soname.test [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
binary-read-arch.test [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
binary-read-bad-soname.test [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
binary-read-bad-vaddr.test [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
binary-read-neededlibs-bad-offset.test [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
binary-read-neededlibs.test [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
binary-read-no-dt-strsz.test [elfabi] Add support for reading DT_SONAME from binaries 2019-01-16 17:47:16 +00:00
binary-read-no-dt-strtab.test [elfabi] Add support for reading DT_SONAME from binaries 2019-01-16 17:47:16 +00:00
binary-read-no-dynamic.test [elfabi] Add support for reading DT_SONAME from binaries 2019-01-16 17:47:16 +00:00
binary-read-replace-soname.test [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
binary-read-soname-no-null.test [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
binary-read-soname.test [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
binary-read-syms-gnu-hash.test [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
binary-read-syms-sysv-hash.test [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
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