Re: C++ name collisions between plugins
Re: C++ name collisions between plugins
- Subject: Re: C++ name collisions between plugins
- From: Darrin Cardani <email@hidden>
- Date: Mon, 26 Aug 2013 14:32:37 -0700
On Aug 26, 2013, at 1:34 PM, Paul Miller <email@hidden> wrote:
>
>>> Yuck. I already have visibility override #pragmas around the Objective
>>> C functions I want exposed. It would be a lot easier to just have
>>> "hide EVERYTHING *except* these 5 things).
>>>
>> I completely agree, but I was happy there was at least a workaround. Currently our list is about 400 entries long, and it's a pain to maintain. In this case nm is your friend (though it still requires hand editing).
>>
> I wanted to mention what I think I got to work (at least it seems to be working).
>
> I ran "nm" to get the names of my FxPlug filter entry points:
>
> [FilterClass1 initWithAPIManager:]
> [FilterClass2 initWithAPIManager:]
> [FilterClass3 initWithAPIManager:]
>
> I put those lines into a symbols.txt file, then pointed the Linker option "Exported Symbols File" at it.
>
> After building, if I run "nm" on the resulting plugin, I still see tons and tons of symbols, but it now loads up without conflict with my older plugin which previously conflicted.
>
> I expected to see only those few initWithAPIManager: symbols in the nm results. Can someone explain why I'm still seeing everything? Can I get rid of the rest of the symbols some other way?
When you run “nm” what is in the first column of the results? Any symbols which get linked at runtime should have a “U” in front of them. The man page for “nm” (like all man pages) is fairly hard to understand, but it appears that nm lists these symbols as being in an “undefined” code segment, since they don’t exist in your binary. They’re always visible because the system has to connect them up once it loads whatever library contains them.
The lines that start with a “T” are symbols that you defined that are being exported. I think there are a few other types of symbols, but I don’t remember all the details. Feel free to post the output here and maybe we can help you decipher it all.
Darrin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden