Changeset 46023 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- May 13, 2013 3:34:54 PM (12 years ago)
- Location:
- trunk/src/VBox/Runtime/common/ldr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/ldr/ldrFile.cpp
r44528 r46023 254 254 LogFlow(("RTLdrOpen: pszFilename=%p:{%s} fFlags=%#x enmArch=%d phLdrMod=%p\n", 255 255 pszFilename, pszFilename, fFlags, enmArch, phLdrMod)); 256 AssertMsgReturn(! fFlags, ("%#x\n", fFlags), VERR_INVALID_PARAMETER);256 AssertMsgReturn(!(fFlags & ~RTLDR_O_VALID_MASK), ("%#x\n", fFlags), VERR_INVALID_PARAMETER); 257 257 AssertMsgReturn(enmArch > RTLDRARCH_INVALID && enmArch < RTLDRARCH_END, ("%d\n", enmArch), VERR_INVALID_PARAMETER); 258 258 … … 306 306 LogFlow(("RTLdrOpenkLdr: pszFilename=%p:{%s} fFlags=%#x enmArch=%d phLdrMod=%p\n", 307 307 pszFilename, pszFilename, fFlags, enmArch, phLdrMod)); 308 AssertMsgReturn(!(fFlags & ~RTLDR_O_VALID_MASK), ("%#x\n", fFlags), VERR_INVALID_PARAMETER); 308 309 309 310 /* -
trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp
r45996 r46023 1153 1153 * @returns iprt status code. 1154 1154 * @param pFileHdr Pointer to the file header that needs validating. 1155 * @param fFlags Valid RTLDR_O_XXX combination. 1155 1156 * @param pszLogName The log name to prefix the errors with. 1156 1157 * @param penmArch Where to store the CPU architecture. 1157 1158 */ 1158 int rtldrPEValidateFileHeader(PIMAGE_FILE_HEADER pFileHdr, const char *pszLogName, PRTLDRARCH penmArch)1159 static int rtldrPEValidateFileHeader(PIMAGE_FILE_HEADER pFileHdr, uint32_t fFlags, const char *pszLogName, PRTLDRARCH penmArch) 1159 1160 { 1160 1161 size_t cbOptionalHeader; … … 1183 1184 } 1184 1185 /* This restriction needs to be implemented elsewhere. */ 1185 if (pFileHdr->Characteristics & IMAGE_FILE_RELOCS_STRIPPED) 1186 if ( (pFileHdr->Characteristics & IMAGE_FILE_RELOCS_STRIPPED) 1187 && !(fFlags & RTLDR_O_FOR_DEBUG)) 1186 1188 { 1187 1189 Log(("rtldrPEOpen: %s: IMAGE_FILE_RELOCS_STRIPPED\n", pszLogName)); … … 1712 1714 int rtldrPEOpen(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, RTFOFF offNtHdrs, PRTLDRMOD phLdrMod) 1713 1715 { 1714 AssertReturn(!fFlags, VERR_INVALID_PARAMETER);1715 1716 1716 /* 1717 1717 * Read and validate the file header. … … 1723 1723 RTLDRARCH enmArchImage; 1724 1724 const char *pszLogName = pReader->pfnLogName(pReader); 1725 rc = rtldrPEValidateFileHeader(&FileHdr, pszLogName, &enmArchImage);1725 rc = rtldrPEValidateFileHeader(&FileHdr, fFlags, pszLogName, &enmArchImage); 1726 1726 if (RT_FAILURE(rc)) 1727 1727 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.