From c27c70dc3dc08570594355a342f6b847dfb09c14 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sat, 3 Feb 2007 02:39:40 +0000 Subject: [PATCH] Pass in non-Mach-O-specific parameters to the GetTargetRelocation method. llvm-svn: 33816 --- llvm/lib/CodeGen/MachOWriter.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/MachOWriter.cpp b/llvm/lib/CodeGen/MachOWriter.cpp index bd7c5364968d..d5958525a961 100644 --- a/llvm/lib/CodeGen/MachOWriter.cpp +++ b/llvm/lib/CodeGen/MachOWriter.cpp @@ -726,8 +726,13 @@ void MachOWriter::CalculateRelocations(MachOSection &MOS) { TargetSection = MOSPtr->Index; MR.setResultPointer((void*)Offset); } - - GetTargetRelocation(MR, MOS, *SectionList[TargetSection-1], Scattered); + + OutputBuffer RelocOut(MOS.RelocBuffer, is64Bit, isLittleEndian); + OutputBuffer SecOut(MOS.SectionData, is64Bit, isLittleEndian); + MachOSection &To = *SectionList[TargetSection - 1]; + + MOS.nreloc += GetTargetRelocation(MR, MOS.Index, To.addr, To.Index, + RelocOut, SecOut, Scattered); } }