diff options
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/COFFObjectFile.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index 04cd616..92f920d 100644 --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/lib/Object/COFFObjectFile.cpp @@ -414,7 +414,8 @@ static uint32_t getNumberOfRelocations(const coff_section *Sec, if (getObject(FirstReloc, M, reinterpret_cast<const coff_relocation*>( base + Sec->PointerToRelocations))) return 0; - return FirstReloc->VirtualAddress; + // -1 to exclude this first relocation entry. + return FirstReloc->VirtualAddress - 1; } return Sec->NumberOfRelocations; } |