How to strip Cocoa Touch frameworks
How to strip Cocoa Touch frameworks
- Subject: How to strip Cocoa Touch frameworks
- From: Andreas Falkenhahn <email@hidden>
- Date: Tue, 27 Dec 2016 13:09:46 +0100
I have a Cocoa Touch framework which should just export a single
symbol named "mytestsymbol". To do this, I create an exported
symbols file that contains just this line:
_mytestsymbol
I then tell the linker to use this file by adding it to the
"Exported Symbols File" entry in "Build Settings->Linking".
However, when building the framework and examining the executable's
contents using a hex editor I can see that pretty much all
global symbols are still there but I don't want to expose those!
When checking the stripping options of the Cocoa Touch framework
I can see that by default this is just set to "Debugging symbols"
whereas when building apps it is set to "All symbols" by default.
So I changed the "Strip style" mode to "All symbols" for my framework
and tried to archive it.
However, that doesn't work either. Now strip returns the following
error:
"Symbols referenced by indirect symbol table entries that can't be stripped in: ..."
Then a list of symbols follows. Those are all symbols my framework
imports from other frameworks, e.g. stuff from the C runtime like
printf(), fopen(), etc but also stuff from Apple frameworks like
CFBundleCopyBundleURL() and so on.
So I think I get this error because strip tries to strip those symbols
but this is of course forbidden because those are needed by my framework.
So how can I tell Xcode to strip *only* the global symbols defined
by my framework (except "mytestsymbol") and not any other imports from
other frameworks?
--
Best regards,
Andreas Falkenhahn mailto:email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden