[llvm-commits] PATCH: Object: Fix SymbolRef::getAddress implementation for ELF

Eric Christopher echristo at apple.com
Wed Sep 19 23:15:48 PDT 2012


On Sep 19, 2012, at 12:07 AM, Alexey Samsonov <samsonov at google.com> wrote:

> Hi!
> 
> <re-sending this patch in its own thread in case it got lost>

It did, apologies.

> LLVM's Object library incorrectly calculates symbol addresses for ELF: in fact, symbol table entry has "value" field which
> should be interpreted differently for different object types (relocated and relocatable).
> 
> This patch fixes llvm-nm output for executables and shared objects on Linux (addresses in symbol table are now correct).
> 
> Probably, the name SymbolRef::getAddress is somewhat confusing, and better naming would be smth like SymbolRef::getVirtualAddress,
> but this renaming would touch all Object specializations and many users of this library (I have the patch that does this as well, though).
> 
> Code review: https://codereview.appspot.com/6532054/

LGTM.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120919/6615293a/attachment.html>


More information about the llvm-commits mailing list