"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/ntdll/loader.c" between
wine-6.0.tar.xz and wine-6.0.1.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs.

loader.c  (wine-6.0.tar.xz):loader.c  (wine-6.0.1.tar.xz)
skipping to change at line 2849 skipping to change at line 2849
case IMAGE_REL_BASED_HIGHLOW: case IMAGE_REL_BASED_HIGHLOW:
*(int *)((char *)page + offset) += delta; *(int *)((char *)page + offset) += delta;
break; break;
#ifdef _WIN64 #ifdef _WIN64
case IMAGE_REL_BASED_DIR64: case IMAGE_REL_BASED_DIR64:
*(INT_PTR *)((char *)page + offset) += delta; *(INT_PTR *)((char *)page + offset) += delta;
break; break;
#elif defined(__arm__) #elif defined(__arm__)
case IMAGE_REL_BASED_THUMB_MOV32: case IMAGE_REL_BASED_THUMB_MOV32:
{ {
DWORD inst = *(INT_PTR *)((char *)page + offset); DWORD *inst = (DWORD *)((char *)page + offset);
DWORD imm16 = ((inst << 1) & 0x0800) + ((inst << 12) & 0xf000) + WORD lo = ((inst[0] << 1) & 0x0800) + ((inst[0] << 12) & 0xf000) +
((inst >> 20) & 0x0700) + ((inst >> 16) & 0x00ff); ((inst[0] >> 20) & 0x0700) + ((inst[0] >> 16) & 0x00ff);
DWORD hi_delta; WORD hi = ((inst[1] << 1) & 0x0800) + ((inst[1] << 12) & 0xf000) +
((inst[1] >> 20) & 0x0700) + ((inst[1] >> 16) & 0x00ff);
if ((inst & 0x8000fbf0) != 0x0000f240) DWORD imm = MAKELONG( lo, hi ) + delta;
ERR("wrong Thumb2 instruction %08x, expected MOVW\n", inst);
lo = LOWORD( imm );
imm16 += LOWORD(delta); hi = HIWORD( imm );
hi_delta = HIWORD(delta) + HIWORD(imm16);
*(INT_PTR *)((char *)page + offset) = (inst & 0x8f00fbf0) + ((imm16 if ((inst[0] & 0x8000fbf0) != 0x0000f240 || (inst[1] & 0x8000fbf0) !
>> 1) & 0x0400) + = 0x0000f2c0)
((imm16 >> 12) & 0x000f) + ERR("wrong Thumb2 instruction @%p %08x:%08x, expected MOVW/MOVT\
((imm16 << 20) & 0x70000000) + n",
((imm16 << 16) & 0xff0000); inst, inst[0], inst[1] );
if (hi_delta != 0) inst[0] = (inst[0] & 0x8f00fbf0) + ((lo >> 1) & 0x0400) + ((lo >> 12
{ ) & 0x000f) +
inst = *(INT_PTR *)((char *)page + offset + 4); ((lo << 20) & 0x70000000) + ((lo
imm16 = ((inst << 1) & 0x0800) + ((inst << 12) & 0xf000) + << 16) & 0xff0000);
((inst >> 20) & 0x0700) + ((inst >> 16) & 0x00ff); inst[1] = (inst[1] & 0x8f00fbf0) + ((hi >> 1) & 0x0400) + ((hi >> 12
) & 0x000f) +
if ((inst & 0x8000fbf0) != 0x0000f2c0) ((hi << 20) & 0x70000000) + ((hi
ERR("wrong Thumb2 instruction %08x, expected MOVT\n", inst); << 16) & 0xff0000);
imm16 += hi_delta;
if (imm16 > 0xffff)
ERR("resulting immediate value won't fit: %08x\n", imm16);
*(INT_PTR *)((char *)page + offset + 4) = (inst & 0x8f00fbf0) +
((imm16 >> 1) & 0x0400
) +
((imm16 >> 12) & 0x000
f) +
((imm16 << 20) & 0x700
00000) +
((imm16 << 16) & 0xff0
000);
}
}
break; break;
}
#endif #endif
default: default:
FIXME("Unknown/unsupported fixup type %x.\n", type); FIXME("Unknown/unsupported fixup type %x.\n", type);
return NULL; return NULL;
} }
relocs++; relocs++;
} }
return (IMAGE_BASE_RELOCATION *)relocs; /* return address of next block */ return (IMAGE_BASE_RELOCATION *)relocs; /* return address of next block */
} }
 End of changes. 2 change blocks. 
39 lines changed or deleted 25 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)