diff options
author | Owen Anderson <resistor@mac.com> | 2011-10-12 21:43:24 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-10-12 21:43:24 +0000 |
commit | 41242942fcbb2e6bc4e5bed3e8041f7b20ece8af (patch) | |
tree | 3c35cef519db53d03288b96d62bbc00b561bc227 /lib/Object/MachOObjectFile.cpp | |
parent | acbaecd4c8e4d19207e63624dcd9e01947b51757 (diff) | |
download | external_llvm-41242942fcbb2e6bc4e5bed3e8041f7b20ece8af.zip external_llvm-41242942fcbb2e6bc4e5bed3e8041f7b20ece8af.tar.gz external_llvm-41242942fcbb2e6bc4e5bed3e8041f7b20ece8af.tar.bz2 |
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
Diffstat (limited to 'lib/Object/MachOObjectFile.cpp')
-rw-r--r-- | lib/Object/MachOObjectFile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Object/MachOObjectFile.cpp b/lib/Object/MachOObjectFile.cpp index b89ff4b..21fd4b6 100644 --- a/lib/Object/MachOObjectFile.cpp +++ b/lib/Object/MachOObjectFile.cpp @@ -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; |