Section indices in MachO symbol tables begin at 1, not 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141815 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2011-10-12 21:43:24 +00:00
parent acbaecd4c8
commit 41242942fc

View File

@ -153,7 +153,7 @@ error_code MachOObjectFile::getSymbolAddress(DataRefImpl DRI,
SymbolOffset = Entry->Value;
SectionIndex = Entry->SectionIndex;
}
getSectionAddress(Sections[SectionIndex], Result);
getSectionAddress(Sections[SectionIndex-1], Result);
Result += SymbolOffset;
return object_error::success;