vbox的更動 46078 路徑 trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp
- 時間撮記:
- 2013-5-14 下午06:22:53 (12 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp
r46048 r46078 942 942 SegInfo.fProt = RTMEM_PROT_READ; 943 943 SegInfo.Alignment = 1; 944 SegInfo.LinkAddress = 0;945 SegInfo.RVA = SegInfo.LinkAddress;944 SegInfo.LinkAddress = pModPe->uImageBase; 945 SegInfo.RVA = 0; 946 946 SegInfo.offFile = 0; 947 947 SegInfo.cb = pModPe->cbHeaders; … … 981 981 else 982 982 { 983 SegInfo.LinkAddress = pSh->VirtualAddress ;984 SegInfo.RVA = SegInfo.LinkAddress;983 SegInfo.LinkAddress = pSh->VirtualAddress + pModPe->uImageBase ; 984 SegInfo.RVA = pSh->VirtualAddress; 985 985 SegInfo.cbMapped = RT_ALIGN(SegInfo.cb, SegInfo.Alignment); 986 986 if (i + 1 < pModPe->cSections && !(pSh[1].Characteristics & IMAGE_SCN_TYPE_NOLOAD)) … … 1012 1012 PRTLDRMODPE pModPe = (PRTLDRMODPE)pMod; 1013 1013 1014 /* Note! LinkAddress == RVA */1014 LinkAddress -= pModPe->uImageBase; 1015 1015 1016 1016 /* Special header segment. */ … … 1051 1051 PRTLDRMODPE pModPe = (PRTLDRMODPE)pMod; 1052 1052 1053 LinkAddress -= pModPe->uImageBase; 1053 1054 if (LinkAddress > pModPe->cbImage) 1054 1055 return VERR_LDR_INVALID_LINK_ADDRESS; 1055 1056 *pRva = LinkAddress; 1057 1056 1058 return VINF_SUCCESS; 1057 1059 } … … 1082 1084 uint32_t *piSeg, PRTLDRADDR poffSeg) 1083 1085 { 1084 int rc = rtldrPE_LinkAddressToSegOffset(pMod, Rva, piSeg, poffSeg); 1086 PRTLDRMODPE pModPe = (PRTLDRMODPE)pMod; 1087 int rc = rtldrPE_LinkAddressToSegOffset(pMod, Rva + pModPe->uImageBase, piSeg, poffSeg); 1085 1088 if (RT_FAILURE(rc)) 1086 1089 rc = VERR_LDR_INVALID_RVA;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器