This is an archive of the discontinued LLVM Phabricator instance.

ELF: Teach SymbolBody about how to get its address.
ClosedPublic

Authored by ruiu on Jan 28 2016, 9:15 PM.

Details

Reviewers
rafael
Summary

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.

Diff Detail

Event Timeline

ruiu updated this revision to Diff 46348.Jan 28 2016, 9:15 PM
ruiu retitled this revision from to ELF: Teach SymbolBody about how to get its address..
ruiu updated this object.
ruiu added a reviewer: rafael.
ruiu added a subscriber: llvm-commits.
rafael accepted this revision.Feb 1 2016, 5:51 AM
rafael edited edge metadata.

LGTM

This revision is now accepted and ready to land.Feb 1 2016, 5:51 AM
ruiu closed this revision.Feb 1 2016, 1:46 PM