diff --git a/research/custom_loader/build.sh b/research/custom_loader/build.sh index d06069c..f7dc694 100755 --- a/research/custom_loader/build.sh +++ b/research/custom_loader/build.sh @@ -42,11 +42,12 @@ clang++ -mmacosx-version-min=$VERSION -o $OUT/libb.dylib -shared -Wl,-reexport_l clang++ -mmacosx-version-min=$VERSION -o $OUT/a -L"./out" -lb a.cc # extract symbols from a -../../macho-go/bin/ios-wrapper remove-imports $OUT/a -o $OUT/a > $OUT/b.h +../../macho-go/bin/ios-wrapper pepe -o $OUT/a-fixed -b $OUT/b.bcell --remove-imports --remove-exports --remove-symbol-table $OUT/a > $OUT/b.h # build libb with symbols extracted from a clang++ -mmacosx-version-min=$VERSION -o $OUT/libb.dylib -shared -Wl,-reexport_library out/libc.dylib b.cc -out/a +codesign --force --deep -s - $OUT/a-fixed +$OUT/a-fixed elif [[ $LOGIC -eq 3 ]] then @@ -65,7 +66,13 @@ clang -fobjc-arc -ObjC -mmacosx-version-min=$VERSION -o $OUT/a -L"./out" -lb a.m # build libb with symbols extracted from a clang++ -mmacosx-version-min=$VERSION -o $OUT/libb.dylib -shared -Wl,-reexport_library out/libc.dylib b.cc -out/a-fixed +codesign --force --deep -s - $OUT/a-fixed + +# export OBJC_PRINT_LOAD_METHODS=1 +# export OBJC_PRINT_CLASS_SETUP=1 +$OUT/a-fixed +# unset OBJC_PRINT_LOAD_METHODS +# unset OBJC_PRINT_CLASS_SETUP else