Changeset 99540 in vbox
- Timestamp:
- Apr 26, 2023 9:38:23 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bldprogs/VBoxDef2LazyLoad.cpp
r99539 r99540 1406 1406 if (g_fWithExplictLoadFunction) 1407 1407 { 1408 if (g_fSystemLibrary) /* Lazy bird. */1409 {1410 fprintf(stderr, "error: cannot use --system with --explicit-load-function, sorry\n");1411 return RTEXITCODE_FAILURE;1412 }1413 1414 1408 int cchLibBaseName = (int)(strchr(g_pszLibrary, '.') ? strchr(g_pszLibrary, '.') - g_pszLibrary : strlen(g_pszLibrary)); 1415 1409 fprintf(pOutput, … … 1454 1448 pszNmPfx, cchLibBaseName, g_pszLibrary); 1455 1449 fprintf(pOutput, 1456 "Lexplicit_load_module:\n" 1457 " ; Call SUPR3HardenedLdrLoadAppPriv(const char *pszFilename, PRTLDRMOD phLdrMod, uint32_t fFlags, PRTERRINFO pErrInfo);\n" 1458 " mov x3, #0\n" 1459 " mov x2, #0\n" 1460 " adrp x1, g_hMod@PAGE\n" 1461 " add x1, x1, g_hMod@PAGEOFF\n" 1462 " adrp x0, g_szLibrary@PAGE\n" 1463 " add x0, x0, g_szLibrary@PAGEOFF\n" 1464 " bl %sSUPR3HardenedLdrLoadAppPriv\n" 1450 "Lexplicit_load_module:\n"); 1451 if (!g_fSystemLibrary) 1452 fprintf(pOutput, 1453 " ; Call SUPR3HardenedLdrLoadAppPriv(const char *pszFilename, PRTLDRMOD phLdrMod, uint32_t fFlags, PRTERRINFO pErrInfo);\n" 1454 " mov x3, x21\n" 1455 " mov x2, #0\n" 1456 " adrp x1, g_hMod@PAGE\n" 1457 " add x1, x1, g_hMod@PAGEOFF\n" 1458 " adrp x0, g_szLibrary@PAGE\n" 1459 " add x0, x0, g_szLibrary@PAGEOFF\n" 1460 " bl %sSUPR3HardenedLdrLoadAppPriv\n" 1461 , pszNmPfx); 1462 else 1463 fprintf(pOutput, 1464 " ; Call RTLdrLoadSystem(const char *pszFilename, bool fNoUnload, PRTLDRMOD phLdrMod);\n" 1465 " adrp x2, g_hMod@PAGE\n" 1466 " add x2, x2, g_hMod@PAGEOFF\n" 1467 " mov x1, #1\n" 1468 " adrp x0, g_szLibrary@PAGE\n" 1469 " add x0, x0, g_szLibrary@PAGEOFF\n" 1470 " bl %sRTLdrLoadSystem\n" 1471 , pszNmPfx); 1472 fprintf(pOutput, 1465 1473 " cmp x0, #0\n" 1466 1474 " b.ne Lexplicit_load_return\n" 1467 "\n" 1468 , pszNmPfx); 1475 "\n"); 1469 1476 1470 1477 fprintf(pOutput,
Note:
See TracChangeset
for help on using the changeset viewer.