[PATCH] D16710: ELF: Teach SymbolBody about how to get its address.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 21:15:45 PST 2016


ruiu created this revision.
ruiu added a reviewer: rafael.
ruiu added a subscriber: llvm-commits.

Previously, the methods to get addresses for a symbol were somewhat
scattered in many places. You can use getEntryAddr returns the address
of the symbol, but if you want to get the GOT address for the symbol,
you needed to call Out<ELFT>::Got->getEntryAddr(Sym).
This change adds new functions, getVA, getGotVA, getGotPltVA, and
getPltVA to SymbolBody, so that you can use SymbolBody as the central
place to ask about symbols.

http://reviews.llvm.org/D16710

Files:
  ELF/InputSection.cpp
  ELF/OutputSections.cpp
  ELF/OutputSections.h
  ELF/Symbols.cpp
  ELF/Symbols.h
  ELF/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16710.46348.patch
Type: text/x-patch
Size: 15208 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160129/75cc4f88/attachment.bin>


More information about the llvm-commits mailing list