Pass in non-Mach-O-specific parameters to the GetTargetRelocation method.
authorBill Wendling <isanbard@gmail.com>
Sat, 3 Feb 2007 02:39:40 +0000 (02:39 +0000)
committerBill Wendling <isanbard@gmail.com>
Sat, 3 Feb 2007 02:39:40 +0000 (02:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33816 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachOWriter.cpp

index bd7c5364968d5d1755f14d12128908f6832912c0..d5958525a961cbe6b4d7d81d276f02b1cd7ffab3 100644 (file)
@@ -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);
   }
 }