HomePhabricator

[elfabi] Add support for reading DT_SONAME from binaries

Authored by amontanez on Jan 16 2019, 9:47 AM.

Description

[elfabi] Add support for reading DT_SONAME from binaries

This change gives the llvm-elfabi tool the ability to read DT_SONAME from a binary ELF file into an ELFStub.

Added:

  • DynamicEntries struct for storing dynamic entries that are relevant to elfabi.
  • terminatedSubstr() retrieves a null-terminated substring from a StringRef.
  • appendToError() appends a string to an error, allowing more specific error messages.

Differential Revision: https://reviews.llvm.org/D55629

llvm-svn: 351361

Details

Committed
amontanezJan 16 2019, 9:47 AM
Differential Revision
D55629: [elfabi] Add support for reading DT_SONAME from binaries
Parents
rG4cd59e0f77ed: Add a REQUIRES: darwin line for a mac test.
Branches
Unknown
Tags
Unknown