Fix SymbolRef::getAddress implementation for ELF. The 'value' field in symbol table...
authorAlexey Samsonov <samsonov@google.com>
Fri, 21 Sep 2012 07:08:08 +0000 (07:08 +0000)
committerAlexey Samsonov <samsonov@google.com>
Fri, 21 Sep 2012 07:08:08 +0000 (07:08 +0000)
commit01fa41a106ed0ff86c3b9ffe0843679211bf487c
tree5156f0942f736a79dfdf9e5cf642e2168b0d1278
parentf17422181fed6c5c73a27622be012c44f93cde4e
Fix SymbolRef::getAddress implementation for ELF. The 'value' field in symbol table entry should be treated differently for relocatable and relocated files. This patch fixes symbol addresses printed by llvm-nm for executables and shared objects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164365 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/ELF.h
include/llvm/Object/ObjectFile.h
test/Object/nm-shared-object.test
test/Object/objdump-symbol-table.test