diff --git a/src/SystemConfiguration/CMakeLists.txt b/src/SystemConfiguration/CMakeLists.txt index ed894f1a9..eb4bae9c1 100644 --- a/src/SystemConfiguration/CMakeLists.txt +++ b/src/SystemConfiguration/CMakeLists.txt @@ -9,6 +9,7 @@ endif(COMMAND cmake_policy) #configure_file(config.h.in config.h) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map") include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/src/external/corefoundation b/src/external/corefoundation index fbe11f1f2..913b9a7a8 160000 --- a/src/external/corefoundation +++ b/src/external/corefoundation @@ -1 +1 @@ -Subproject commit fbe11f1f20399a889630361a834837ec884fd9dd +Subproject commit 913b9a7a821d03c1449e5d0d571eb01c0716d1f6 diff --git a/src/libdyld/MachOObject.cpp b/src/libdyld/MachOObject.cpp index a8b1191ad..b8ac6c193 100644 --- a/src/libdyld/MachOObject.cpp +++ b/src/libdyld/MachOObject.cpp @@ -548,9 +548,9 @@ void MachOObject::loadDependencies() if (libSystem->refCount() > 1) libSystem->delRef(); - else + else if (isMainModule()) { - std::cerr << "Beware! This executable does not link against libSystem. " + std::cerr << "Beware! This executable (" << this->name() << ") does not link against libSystem. " "It is very likely a Go binary or an otherwise non-standard executable that makes direct system calls.\n" "Darling currently doesn't support that (#193).\n"; } @@ -846,6 +846,8 @@ void* MachOObject::performBind(MachO::Bind* bind) } } + ss << " when loading " << name(); + throw std::runtime_error(ss.str()); } }