From 706576d5aea1724597b3c8eb127bff251d553278 Mon Sep 17 00:00:00 2001 From: Apple Date: Tue, 26 Sep 2017 16:29:44 +0000 Subject: [PATCH] Libsystem-1252.tar.gz --- init.c | 7 +++++-- requiredlibs | 10 +++++----- xcodescripts/linker_arguments.sh | 15 ++++++++++----- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/init.c b/init.c index c3a3d3c..b62772f 100644 --- a/init.c +++ b/init.c @@ -51,6 +51,7 @@ extern void _libxpc_initializer(void); // from libxpc.dylib extern void _libsecinit_initializer(void); // from libsecinit.dylib extern void _libtrace_init(void); // from libsystem_trace.dylib extern void _container_init(const char *apple[]); // from libsystem_containermanager.dylib +extern void __libdarwin_init(void); // from libsystem_darwin.dylib // signal malloc stack logging that initialisation has finished @@ -155,7 +156,7 @@ libSystem_initializer(int argc, // TODO: Move __malloc_init before __libc_init after breaking malloc's upward link to Libc __malloc_init(apple); -#if !TARGET_OS_SIMULATOR && !TARGET_OS_TV && !TARGET_OS_WATCH +#if TARGET_OS_OSX /* */ __keymgr_initializer(); #endif @@ -176,9 +177,11 @@ libSystem_initializer(int argc, _container_init(apple); #endif + __libdarwin_init(); + __stack_logging_early_finished(); -#if TARGET_OS_EMBEDDED && !TARGET_OS_WATCH && !__LP64__ +#if TARGET_OS_EMBEDDED && TARGET_OS_IOS && !__LP64__ _vminterpose_init(); #endif diff --git a/requiredlibs b/requiredlibs index 5343f7c..15411b8 100644 --- a/requiredlibs +++ b/requiredlibs @@ -13,17 +13,17 @@ system_blocks system_c system_configuration system_coreservices -system_coretls +system_darwin system_dnssd system_info -system_kernel system_sim_kernel +system_sim_kernel system_kernel system_m system_malloc system_network system_notify -system_platform system_sim_platform -system_pthread system_sim_pthread +system_sim_platform system_platform +system_sim_pthread system_pthread system_sandbox system_trace -unwind unwind_sim +unwind xpc diff --git a/xcodescripts/linker_arguments.sh b/xcodescripts/linker_arguments.sh index ea75f9f..6be6cd7 100755 --- a/xcodescripts/linker_arguments.sh +++ b/xcodescripts/linker_arguments.sh @@ -47,11 +47,15 @@ for arch in ${ARCHS}; do # Strip away variant information to do presence checks # non-normal variants can always link against normal clients - cd ${LSYS} && ls lib*.dylib | sed -E -e 's/_(debug|profile|static)\././' | while read l; do - xcrun -sdk "${SDKROOT}" lipo "${LSYS}/${l}" -verify_arch "${arch}" 2>/dev/null - if [ $? -eq 0 ]; then - echo "${l}" - fi + cd ${LSYS} && ls lib*.{dylib,tbd,api,spi} | sed -E -e 's/_(debug|profile|static)\././' | while read l; do + if [ "${l: -6}" == ".dylib" ]; then + xcrun -sdk "${SDKROOT}" lipo "${LSYS}/${l}" -verify_arch "${arch}" 2>/dev/null + else + xcrun -sdk "${SDKROOT}" tapi archive "${LSYS}/${l}" --verify-arch "${arch}" 2>/dev/null + fi + if [ $? -eq 0 ]; then + echo "${l}" + fi done | sed -E -e 's/^lib//' -e 's/\..*$$//' | sort -u > ${INUSRLIBSYSTEM} cd ${LIBSYS} && ls lib*.a | sed -E -e 's/_(debug|profile|static)\././' | while read l; do xcrun -sdk "${SDKROOT}" lipo "${LIBSYS}/${l}" -verify_arch "${arch}" 2>/dev/null @@ -68,6 +72,7 @@ for arch in ${ARCHS}; do while read line ; do for lib in ${line} ; do + egrep -q "^${lib}$" ${INUSRLIBSYSTEM} && break egrep "^${lib}$" ${INUSRLOCALLIBSYSTEM} && break done done < ${ALLLIBS} > ${POSSIBLEUSRLOCALLIBSYSTEM} -- 2.47.2