Index: trunk/src/bldprogs/VBoxDef2LazyLoad.cpp
===================================================================
--- trunk/src/bldprogs/VBoxDef2LazyLoad.cpp	(revision 105378)
+++ trunk/src/bldprogs/VBoxDef2LazyLoad.cpp	(revision 105813)
@@ -1230,21 +1230,12 @@
                     "___LazyLoad___%s:\n"
                     "    adrp    x9, PAGE(g_sz%s)\n"
-                    "#ifndef ASM_FORMAT_ELF\n"
                     "    add     x9, x9, PAGEOFF(g_sz%s)\n"
-                    "#else\n"
-                    "    ldr     x9, [x9, PAGEOFF(g_sz%s)]\n"
-                    "#endif\n"
                     "    adrp    x10, PAGE(NAME(%s%s))\n"
-                    "#ifndef ASM_FORMAT_ELF\n"
                     "    add     x10, x10, PAGEOFF(NAME(%s%s))\n"
-                    "#else\n"
-                    "    ldr     x10, [x10, PAGEOFF(NAME(%s%s))]\n"
-                    "#endif\n"
                     "    mov     x16, x30\n"
                     "    bl      LazyLoadResolver\n"
                     "    mov     x30, x16\n"
                     , pExp->pszExportedNm,
-                    pExp->pszExportedNm, pExp->pszExportedNm, pExp->pszExportedNm,
-                    !pExp->fData ? "g_pfn" : "g_LazyPtr_", pExp->pszExportedNm,
+                    pExp->pszExportedNm, pExp->pszExportedNm,
                     !pExp->fData ? "g_pfn" : "g_LazyPtr_", pExp->pszExportedNm,
                     !pExp->fData ? "g_pfn" : "g_LazyPtr_", pExp->pszExportedNm);
@@ -1254,12 +1245,7 @@
                     "    movk    w9, #%u\n"
                     "    adrp    x10, PAGE(NAME(%s%s))\n"
-                    "#ifndef ASM_FORMAT_ELF\n"
                     "    add     x10, x10, PAGEOFF(NAME(%s%s))\n"
-                    "#else\n"
-                    "    ldr     x10, [x10, PAGEOFF(NAME(%s%s))]\n"
-                    "#endif\n"
                     , pExp->pszExportedNm,
                     pExp->uOrdinal,
-                    !pExp->fData ? "g_pfn" : "g_LazyPtr_", pExp->pszExportedNm,
                     !pExp->fData ? "g_pfn" : "g_LazyPtr_", pExp->pszExportedNm,
                     !pExp->fData ? "g_pfn" : "g_LazyPtr_", pExp->pszExportedNm);
@@ -1358,16 +1344,8 @@
             "    mov     x3, x0\n"
             "    adrp    x2, PAGE(g_szLibrary)\n"
-            "#ifndef ASM_FORMAT_ELF\n"
             "    add     x2, x2, PAGEOFF(g_szLibrary)\n"
-            "#else\n"
-            "    ldr     x2, [x2, PAGEOFF(g_szLibrary)]\n"
-            "#endif\n"
             "    mov     x1, x19\n"
             "    adrp    x0, PAGE(g_szFailLoadFmt)\n"
-            "#ifndef ASM_FORMAT_ELF\n"
             "    add     x0, x0, PAGEOFF(g_szFailLoadFmt)\n"
-            "#else\n"
-            "    ldr     x0, [x0, PAGEOFF(g_szFailLoadFmt)]\n"
-            "#endif\n"
             "    stp     x1, x2, [sp]\n"
             "    str     x3,     [sp, #16]\n"
@@ -1437,15 +1415,7 @@
                 "    mov     x2, #0\n"
                 "    adrp    x1, PAGE(g_hMod)\n"
-                "#ifndef ASM_FORMAT_ELF\n"
                 "    add     x1, x1, PAGEOFF(g_hMod)\n"
-                "#else\n"
-                "    ldr     x1, [x1, PAGEOFF(g_hMod)]\n"
-                "#endif\n"
                 "    adrp    x0, PAGE(g_szLibrary)\n"
-                "#ifndef ASM_FORMAT_ELF\n"
                 "    add     x0, x0, PAGEOFF(g_szLibrary)\n"
-                "#else\n"
-                "    ldr     x0, [x0, PAGEOFF(g_szLibrary)]\n"
-                "#endif\n"
                 "    bl      NAME(SUPR3HardenedLdrLoadAppPriv)\n");
     else
@@ -1453,16 +1423,8 @@
                 "    /* Call RTLdrLoadSystem(const char *pszFilename, bool fNoUnload, PRTLDRMOD phLdrMod); */\n"
                 "    adrp    x2, PAGE(g_hMod)\n"
-                "#ifndef ASM_FORMAT_ELF\n"
                 "    add     x2, x2, PAGEOFF(g_hMod)\n"
-                "#else\n"
-                "    ldr     x2, [x2, PAGEOFF(g_hMod)]\n"
-                "#endif\n"
                 "    mov     x1, #1\n"
                 "    adrp    x0, PAGE(g_szLibrary)\n"
-                "#ifndef ASM_FORMAT_ELF\n"
                 "    add     x0, x0, PAGEOFF(g_szLibrary)\n"
-                "#else\n"
-                "    ldr     x0, [x0, PAGEOFF(g_szLibrary)]\n"
-                "#endif\n"
                 "    bl      NAME(RTLdrLoadSystem)\n");
 
@@ -1474,15 +1436,7 @@
             "    mov     x2, x0\n"
             "    adrp    x1, PAGE(g_szLibrary)\n"
-            "#ifndef ASM_FORMAT_ELF\n"
             "    add     x1, x1, PAGEOFF(g_szLibrary)\n"
-            "#else\n"
-            "    ldr     x1, [x1, PAGEOFF(g_szLibrary)]\n"
-            "#endif\n"
             "    adrp    x0, PAGE(g_szFailResolveFmt)\n"
-            "#ifndef ASM_FORMAT_ELF\n"
             "    add     x0, x0, PAGEOFF(g_szFailResolveFmt)\n"
-            "#else\n"
-            "    ldr     x0, [x0, PAGEOFF(g_szFailResolveFmt)]\n"
-            "#endif\n"
             "    stp     x1, x2, [sp]\n"
             "    bl      NAME(RTAssertMsg2Weak)\n"
@@ -1558,15 +1512,7 @@
                     "    mov     x2, #0\n"
                     "    adrp    x1, PAGE(g_hMod)\n"
-                    "#ifndef ASM_FORMAT_ELF\n"
                     "    add     x1, x1, PAGEOFF(g_hMod)\n"
-                    "#else\n"
-                    "    ldr     x1, [x1, PAGEOFF(g_hMod)]\n"
-                    "#endif\n"
                     "    adrp    x0, PAGE(g_szLibrary)\n"
-                    "#ifndef ASM_FORMAT_ELF\n"
                     "    add     x0, x0, PAGEOFF(g_szLibrary)\n"
-                    "#else\n"
-                    "    ldr     x0, [x0, PAGEOFF(g_szLibrary)]\n"
-                    "#endif\n"
                     "    bl      NAME(SUPR3HardenedLdrLoadAppPriv)\n");
         else
@@ -1574,16 +1520,8 @@
                     "    /* Call RTLdrLoadSystem(const char *pszFilename, bool fNoUnload, PRTLDRMOD phLdrMod); */\n"
                     "    adrp    x2, PAGE(g_hMod)\n"
-                    "#ifndef ASM_FORMAT_ELF\n"
                     "    add     x2, x2, PAGEOFF(g_hMod)\n"
-                    "#else\n"
-                    "    ldr     x2, [x2, PAGEOFF(g_hMod)]\n"
-                    "#endif\n"
                     "    mov     x1, #1\n"
                     "    adrp    x0, PAGE(g_szLibrary)\n"
-                    "#ifndef ASM_FORMAT_ELF\n"
                     "    add     x0, x0, PAGEOFF(g_szLibrary)\n"
-                    "#else\n"
-                    "    ldr     x0, [x0, PAGEOFF(g_szLibrary)]\n"
-                    "#endif\n"
                     "    bl      NAME(RTLdrLoadSystem)\n");
         fprintf(pOutput,
@@ -1601,15 +1539,7 @@
                 "\n"
                 "    adrp     x22, PAGE(g_szzNames)\n"
-                "#ifndef ASM_FORMAT_ELF\n"
                 "    add      x22, x22, PAGEOFF(g_szzNames)\n"
-                "#else\n"
-                "    ldr      x22, [x22, PAGEOFF(g_szzNames)]\n"
-                "#endif\n"
                 "    adrp     x23, PAGE(g_apfnImports)\n"
-                "#ifndef ASM_FORMAT_ELF\n"
                 "    add      x23, x23, PAGEOFF(g_apfnImports)\n"
-                "#else\n"
-                "    ldr      x23, [x23, PAGEOFF(g_apfnImports)]\n"
-                "#endif\n"
                 "Lexplicit_load_next_import:\n"
                 "    ldr     x0, [x23]\n"
