Re: Strip symbols from framework (dumb?)
Re: Strip symbols from framework (dumb?)
- Subject: Re: Strip symbols from framework (dumb?)
- From: Jerry Krinock <email@hidden>
- Date: Tue, 8 May 2007 21:30:30 -0700
On 2007 May, 08, at 19:35, Rick Altherr wrote:
It depends. In order for dyld (the program that glues together
calls from one binary to another) to work, any functions in your
framework that your program calls need to be exported by your
framework. That is generally a subset of the symbols that a
framework has, however. Since the compiler and linker have no idea
what symbols are intended to be called by users of a framework, it
default to making every symbol exported. Now, you can limit the
symbols that are exported by creating a text file that has a list
of symbols you want exported (or you want _not_ exported, but
generally it's easier to maintain a list of what should be
exported) one per line. Note that these should be mangled forms of
symbols (i.e. the type you see from the output of nm). Once you
have that file, you need to edit your target's settings and set
EXPORTED_SYMBOLS_FILE (or UNEXPORTED_SYMBOLS_FILE if you want to
have a list of symbols _not_ to be exported). Now when you build
your framework, only the symbols you want to be exported will show
up in nm. If you accidentally forget a symbol that your project
needs, the project will fail to link.
--
Rick Altherr
Architecture and Performance Group
email@hidden
Thanks, Rick. Yes, I understand that I can hide symbols that I don't
need. But of course those aren't the ones I'm concerned with
hiding! So, I would summarize your reply to say:
"Whatever framework symbols you use canNOT be hidden."
Apparently, when Xcode builds a framework, it ignores all those
"Strip" build settings and uses the UN/EXPORTED_SYMBOLS files
instead. (I presume that using the UN/EXPORTED_SYMBOLS files are
like setting public/project/private in each header of the "Copy
Headers" build phase, except with more granularity.)
So, I conclude that, as my dumb wit had suspected, the only way to
keep used symbols hidden is to code them in the app, and not in the
framework.
_______________________________________________
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