summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-10-12 21:43:24 +0000
committerOwen Anderson <resistor@mac.com>2011-10-12 21:43:24 +0000
commitf903c154c7cc15484b042e602cbdfa54e06fbac7 (patch)
treebaf64e7866f7b4f4611ef94be7764f61a393bf9d /llvm/lib/Object/MachOObjectFile.cpp
parente7c0c499b89fc092a3de0f102e22f5a16325eb04 (diff)
downloadbcm5719-llvm-f903c154c7cc15484b042e602cbdfa54e06fbac7.tar.gz
bcm5719-llvm-f903c154c7cc15484b042e602cbdfa54e06fbac7.zip
Section indices in MachO symbol tables begin at 1, not 0.
llvm-svn: 141815
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r--llvm/lib/Object/MachOObjectFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index b89ff4beb7a..21fd4b6915c 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud