[PATCH] D56031: [elfabi] Add support for reading dynamic symbols from binaries

Armando Montanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 23 17:26:29 PST 2019


amontanez marked 3 inline comments as done.
amontanez added inline comments.


================
Comment at: llvm/tools/llvm-elfabi/ELFObjHandler.cpp:273-275
+    ELFSymbol Sym(*SymName);
+    populateSymbol<ELFT>(Sym, RawSym);
+    TargetStub.Symbols.insert(std::move(Sym));
----------------
jakehehrlich wrote:
> This would all be nicer if populateSymbol was part of a constructor for ELFSymbol and then you could used `TargetStub.Symbols.emplace(*SymName, RawSym)` instead of these 3 lines.
Since we can't have TextAPI rely on libObject, we can't add a constructor for ELFSymbol that uses ELFT. I've changed `populateSymbol()` to `createELFSymbol()` so this portion looks slightly better.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56031/new/

https://reviews.llvm.org/D56031





More information about the llvm-commits mailing list