Fixing behavior of ELFObjectFile::getSymbolFileOffset().
authorAndrew Kaylor <andrew.kaylor@intel.com>
Fri, 18 Jan 2013 23:40:42 +0000 (23:40 +0000)
committerAndrew Kaylor <andrew.kaylor@intel.com>
Fri, 18 Jan 2013 23:40:42 +0000 (23:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172872 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Object/ELF.h

index 417a0f1cc937be97d0dbbcdf91012b18b8432d1f..136fdf5e5e78146f759d8c304d95f9b51b148a93 100644 (file)
@@ -1000,7 +1000,7 @@ error_code ELFObjectFile<ELFT>::getSymbolFileOffset(DataRefImpl Symb,
 
   switch (symb->getType()) {
   case ELF::STT_SECTION:
-    Result = Section ? Section->sh_addr : UnknownAddressOrSize;
+    Result = Section ? Section->sh_offset : UnknownAddressOrSize;
     return object_error::success;
   case ELF::STT_FUNC:
   case ELF::STT_OBJECT: