diff --git a/CMakeLists.txt b/CMakeLists.txt index e6b138aae..552154f93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,8 +59,9 @@ if (NOT DARLING_NO_EXECUTABLES) install(FILES etc/dylib.conf etc/version.conf DESTINATION libexec/darling/etc/darling) - install(DIRECTORY DESTINATION libexec/darling/system-root) install(DIRECTORY DESTINATION libexec/darling/Volumes) + install(DIRECTORY DESTINATION libexec/darling/Volumes/SystemRoot) + InstallSymlink(/ /usr/local/libexec/darling/Volumes/DarlingEmulatedDrive) install(DIRECTORY DESTINATION libexec/darling/proc) @@ -72,14 +73,14 @@ if (NOT DARLING_NO_EXECUTABLES) install(DIRECTORY DESTINATION libexec/darling/usr) install(DIRECTORY DESTINATION libexec/darling/usr/local) install(DIRECTORY DESTINATION libexec/darling/usr/local/share) - InstallSymlink(/system-root/usr/local/share/darling /usr/local/libexec/darling/usr/local/share/darling) + InstallSymlink(/Volumes/SystemRoot/usr/local/share/darling /usr/local/libexec/darling/usr/local/share/darling) - InstallSymlink(/system-root/dev /usr/local/libexec/darling/dev) - InstallSymlink(/system-root/tmp /usr/local/libexec/darling/tmp) - InstallSymlink(/system-root/home /usr/local/libexec/darling/Users) + InstallSymlink(/Volumes/SystemRoot/dev /usr/local/libexec/darling/dev) + InstallSymlink(/Volumes/SystemRoot/tmp /usr/local/libexec/darling/tmp) + InstallSymlink(/Volumes/SystemRoot/home /usr/local/libexec/darling/Users) install(DIRECTORY DESTINATION libexec/darling/etc/ld.so.conf.d) install(CODE "execute_process(COMMAND bash ${DARLING_TOP_DIRECTORY}/src/setup-ld-so.sh WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/libexec/darling)") - InstallSymlink(/system-root/lib /usr/local/libexec/darling/lib) - InstallSymlink(/system-root/lib64 /usr/local/libexec/darling/lib64) + InstallSymlink(/Volumes/SystemRoot/lib /usr/local/libexec/darling/lib) + InstallSymlink(/Volumes/SystemRoot/lib64 /usr/local/libexec/darling/lib64) endif (NOT DARLING_NO_EXECUTABLES) diff --git a/src/dyld/darling-so-start.S b/src/dyld/darling-so-start.S index 08ba212eb..a8fc8f847 100644 --- a/src/dyld/darling-so-start.S +++ b/src/dyld/darling-so-start.S @@ -62,7 +62,7 @@ strcat_end: movl $__NR_execve, %eax syscall - // If we failed to find dyld under /system-root, + // If we failed to find dyld under the system root, // try again without it leaq dyld_host_path(%rip), %rdi // exec path movq %rsp, %rsi // argv diff --git a/src/setup-ld-so.sh b/src/setup-ld-so.sh index 0a9790d6b..4c3d3ab30 100644 --- a/src/setup-ld-so.sh +++ b/src/setup-ld-so.sh @@ -5,8 +5,8 @@ for file in /etc/ld.so.conf $(find /etc/ld.so.conf.d/ -type f); do # Copy lines from e.g. /etc/ld.so.conf into ./etc/ld.so.conf, - # prepending "/system-root" to each line that starts with a slash - awk '/^\// { print "/system-root" $0 }; /^[^/]/' $file > .$file + # prepending "/Volumes/SystemRoot" to each line that starts with a slash + awk '/^\// { print "/Volumes/SystemRoot" $0 }; /^[^/]/' $file > .$file done -unshare --mount bash -c "mount --rbind / system-root && ldconfig -r . -X" +unshare --mount bash -c "mount --rbind / Volumes/SystemRoot && ldconfig -r . -X"