···23792379{
23802380 vm_address_t addr = 0;
23812381 vm_size_t size = length;
23822382+ // In Darling, we're not the only ones doing memory mapping.
23832383+ // Therefore, we cannot dictate addresses, because we could (would!) conflict with the ELF loader.
23842384+#ifndef DARLING
23822385 // in PIE programs, load initial dylibs after main executable so they don't have fixed addresses either
23832386 if ( fgNextPIEDylibAddress != 0 ) {
23842387 // add small (0-3 pages) random padding between dylibs
···23912394 }
23922395 fgNextPIEDylibAddress = 0;
23932396 }
23972397+#endif
23942398 kern_return_t r = vm_alloc(&addr, size, VM_FLAGS_ANYWHERE | VM_MAKE_TAG(VM_MEMORY_DYLIB));
23952399 if ( r != KERN_SUCCESS )
23962400 throw "out of address space";