diff options
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | ios-bootstrap/posixspawn-hook.c | 3 | ||||
-rw-r--r-- | lib/darwin/stop-other-threads.c | 1 |
3 files changed, 6 insertions, 3 deletions
@@ -5,7 +5,7 @@ CC := clang CXX := clang++ ARCH := -arch x86_64 -XCFLAGS := -O3 -Wall -Wextra -Werror -Ilib $(ARCH) +XCFLAGS := -g -O3 -Wall -Wextra -Werror -Ilib $(ARCH) LIB_LDFLAGS := -lobjc -dynamiclib -fvisibility=hidden -install_name /usr/lib/libsubstitute.0.dylib -dead_strip IOS_APP_LDFLAGS := -framework UIKit -framework Foundation -dead_strip ifneq (,$(IS_IOS)) @@ -79,6 +79,7 @@ LIB_OBJS := \ out/libsubstitute.dylib: $(LIB_OBJS) $(CC) -o $@ $(LIB_OBJS) $(LIB_LDFLAGS) + dsymutil $@ # The result of this is also checked into generated, just in case someone is # trying to build with some Linux compiler that doesn't support all the @@ -105,7 +106,7 @@ out/%.bin: out/%.o Makefile define define_test out/test-$(1): test/test-$(2).[cm]* $(HEADERS) $(GENERATED) Makefile out/libsubstitute.dylib - $(3) -g -o $$@ $$< -Ilib -Isubstrate -Lout -lsubstitute -dead_strip + $(3) -o $$@ $$< -Ilib -Isubstrate -Lout -lsubstitute -dead_strip install_name_tool -change /usr/lib/libsubstitute.0.dylib '@executable_path/libsubstitute.dylib' $$@ ifneq (,$(IS_IOS)) ldid -Sent.plist $$@ diff --git a/ios-bootstrap/posixspawn-hook.c b/ios-bootstrap/posixspawn-hook.c index 25c7973..d1908a6 100644 --- a/ios-bootstrap/posixspawn-hook.c +++ b/ios-bootstrap/posixspawn-hook.c @@ -213,6 +213,9 @@ void substitute_init(struct shuttle *shuttle, UNUSED size_t nshuttle) { * what the notify port is for. Meanwhile, the jailbreak I have installed * properly runs rc.d sequentially, so the injection tools won't do their * thing at the same time. But just in case any of that doesn't hold up... + * + * (it also decreases the amount of library code necessary to load from + * disk...) */ struct substitute_image *im = substitute_open_image(_dyld_get_image_name(0)); diff --git a/lib/darwin/stop-other-threads.c b/lib/darwin/stop-other-threads.c index 1a4f43f..ff239f3 100644 --- a/lib/darwin/stop-other-threads.c +++ b/lib/darwin/stop-other-threads.c @@ -149,7 +149,6 @@ int apply_pc_patch_callback(void *token, return ret; } - int resume_other_threads(void *token) { struct htab_mach_port_set *suspended_set = token; HTAB_FOREACH(suspended_set, mach_port_t *threadp, |