Home | History | Annotate | Download | only in Inputs

Lines Matching refs:relocs

175   def patch(self, f, relocs):
177 self.patchRelocs(f, relocs)
179 def patchRelocs(self, f, relocs):
186 if index < len(relocs):
195 f.writeUInt8(relocs[ri][1])
196 f.writeUInt8(relocs[ri][1])
197 f.writeUInt8(relocs[ri][1])
202 r_type = relocs[ri][1]
208 print(" %s" % relocs[ri][0])
242 def craftElf(filename, triple, relocs, dummyReloc):
247 for i in range((len(relocs) + relocsPerDummy - 1) / relocsPerDummy):
251 src = (dummyReloc + "\n") * len(relocs)
255 patchElf(filename, relocs)
257 def patchElf(path, relocs):
313 sections[index].patch(f, relocs)
316 def craftCoff(filename, triple, relocs, dummyReloc):
318 src = (dummyReloc + "\n") * len(relocs)
322 patchCoff(filename, relocs)
324 def patchCoff(path, relocs):
338 print(" %s" % relocs[i][0])
339 f.writeUInt16(relocs[i][1])
342 def craftMacho(filename, triple, relocs, dummyReloc):
348 for i in range((len(relocs) + relocsPerDummy - 1) / relocsPerDummy):
355 src = (dummyReloc + "\n") * len(relocs)
359 patchMacho(filename, relocs)
361 def patchMacho(filename, relocs):
388 patchMachoLoadCommand(f, relocs)
394 def patchMachoLoadCommand(f, relocs):
400 patchMachoSegmentLoadCommand(f, relocs)
402 patchMachoSegmentLoadCommand(f, relocs)
410 def patchMachoSegmentLoadCommand(f, relocs):
421 patchMachoSection(f, relocs)
423 def patchMachoSection(f, relocs):
442 ri = i < len(relocs) and i or 0
443 print(" %s" % relocs[ri][0])
448 value = (value & 0x0FFFFFFF) | ((relocs[ri][1] & 0xF) << 28)
1041 craftElf("relocs.obj.elf-x86_64", "x86_64-pc-linux-gnu", Relocs_Elf_X86_64.entries(), "leaq sym@GOTTPOFF(%rip), %rax")
1042 craftElf("relocs.obj.elf-i386", "i386-pc-linux-gnu", Relocs_Elf_i386.entries(), "mov sym@GOTOFF(%ebx), %eax")
1043 #craftElf("relocs-elf-ppc32", "powerpc-unknown-linux-gnu", Relocs_Elf_PPC32.entries(), ...)
1044 craftElf("relocs.obj.elf-ppc64", "powerpc64-unknown-linux-gnu", Relocs_Elf_PPC64.entries(),
1046 craftElf("relocs.obj.elf-aarch64", "aarch64", Relocs_Elf_AArch64.entries(), "movz x0, #:abs_g0:sym")
1047 craftElf("relocs.obj.elf-arm", "arm-unknown-unknown", Relocs_Elf_ARM.entries(), "b sym")
1048 craftElf("relocs
1049 craftElf("relocs.obj.elf-mips64el", "mips64el-unknown-linux", Relocs_Elf_Mips.entries(), "lui $2, %hi(sym)")
1050 #craftElf("relocs.obj.elf-hexagon", "hexagon-unknown-unknown", Relocs_Elf_Hexagon.entries(), ...)
1052 craftCoff("relocs.obj.coff-i386", "i386-pc-win32", Relocs_Coff_i386.entries(), "mov foo@imgrel(%ebx, %ecx, 4), %eax")
1053 craftCoff("relocs.obj.coff-x86_64", "x86_64-pc-win32", Relocs_Coff_X86_64.entries(), "mov foo@imgrel(%ebx, %ecx, 4), %eax")
1054 #craftCoff("relocs.obj.coff-arm", "arm-pc-win32", Relocs_Coff_ARM.entries(), "...")
1056 craftMacho("relocs.obj.macho-i386", "i386-apple-darwin9", Relocs_Macho_i386.entries(),
1058 craftMacho("relocs.obj.macho-x86_64", "x86_64-apple-darwin9", Relocs_Macho_X86_64.entries(),
1060 craftMacho("relocs.obj.macho-arm", "armv7-apple-darwin10", Relocs_Macho_ARM.entries(), "bl sym")
1061 #craftMacho("relocs.obj.macho-ppc", "powerpc-apple-darwin10", Relocs_Macho_PPC.entries(), ...)