Lines Matching defs:patch
201 /* Get aligned start address we're going to patch*/
318 char patch[FAKEDRI_JMP64_PATCH_SIZE];
377 /*@todo we don't really know the size of targeted static function, but it's long enough in practice. We will also patch same place twice, but it's ok.*/
382 /*it's a rel8 jmp, so we're going to patch the place it targets instead of jmp itself*/
388 crError("Can't patch size is too small.(%s)", psFuncName);
399 crError("Can't patch size is too small.(%s)", psFuncName);
416 patch[0] = 0x49; /*movq %r11,imm64*/
417 patch[1] = 0xBB;
418 crMemcpy(&patch[2], &pStart, 8);
419 patch[10] = 0x41; /*jmp *%r11*/
420 patch[11] = 0xFF;
421 patch[12] = 0xE3;
422 pStart = &patch[0];
423 pEnd = &patch[FAKEDRI_JMP64_PATCH_SIZE];
429 crDebug("Can't patch offset is too big. Pushing for 2nd pass(%s)", psFuncName);
431 /*Add patch node to repatch with chain jmps in 2nd pass*/
454 patch[0] = 0xE9;
455 crMemcpy(&patch[1], &shift, 4);
456 pStart = &patch[0];
457 pEnd = &patch[5];
492 char patch[FAKEDRI_JMP64_PATCH_SIZE];
522 patch[0] = 0xE9;
523 crMemcpy(&patch[1], &offset, 4);
528 vboxApplyPatch(pPatchNode->psFuncName, pPatchNode->pDstStart, &patch[0], 5);
531 patch[0] = 0x49; /*movq %r11,imm64*/
532 patch[1] = 0xBB;
533 crMemcpy(&patch[2], &pPatchNode->pSrcStart, 8);
534 patch[10] = 0x41; /*jmp *%r11*/
535 patch[11] = 0xFF;
536 patch[12] = 0xE3;
541 vboxApplyPatch(pFreeNode->psFuncName, pFreeNode->pDstStart, &patch[0], FAKEDRI_JMP64_PATCH_SIZE);
697 /* Now patch functions exported by libGL.so */