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)
commitad1191fbb68faa69b43c2b6b5aa7d6cefc6f7c6b
tree952c087c614af3f8187edd847822a65175b7a3af
parente460a4ea2d5923f7d1a2ea282f64c4fbb5abf45c
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.

llvm-svn: 164365
llvm/include/llvm/Object/ELF.h
llvm/include/llvm/Object/ObjectFile.h
llvm/test/Object/nm-shared-object.test
llvm/test/Object/objdump-symbol-table.test