Jon Smirl wrote: > > After reading some of the other postings about XPCOM and symbols, I looked > at the exports for a few components. I understand why NSGetModule is > exported, but many components export a lot more symbols. > > So why are all of the extra entry points needed? When I grep the source of > the components these symbols aren't being referenced. > > This isn't causing me any problems, but eliminating exported symbols should > help with component load times. > > From xmlextras component: > > ??0nsGetInterface@@QAE@ABV0@@Z > ??0nsGetInterface@@QAE@PAVnsISupports@@PAI@Z > ??0nsQueryElementAt@@QAE@ABV0@@Z > ??0nsQueryElementAt@@QAE@PAVnsICollection@@IPAI@Z > ??0nsQueryReferent@@QAE@ABV0@@Z > ??0nsQueryReferent@@QAE@PAVnsIWeakReference@@PAI@Z > ??1nsCOMPtr_base@@QAE@XZ > ??1nsGetInterface@@UAE@XZ > ??4nsGetInterface@@QAEAAV0@ABV0@@Z > ??4nsQueryElementAt@@QAEAAV0@ABV0@@Z > ??4nsQueryReferent@@QAEAAV0@ABV0@@Z > ??_7nsGetInterface@@6B@ > ??_7nsQueryElementAt@@6B@ > ??_7nsQueryReferent@@6B@ > NSGetModule > > -- > Jon Smirl > [EMAIL PROTECTED]
Those are exported from some dlls because they are inlined methods in classes declared as NS_COM (aka NS_EXPORT) which makes them get exported in their respective dlls if used by any code in the dll. *Maybe* some of those classes don't need to be marked as export. But if any have non-inlined methods (that live in xpcom.dll) then those methods would not get exported and callers to those methods would have link problems. There might be a small win here. But, (at least on Win32) exported symbols are time-cheap. John.
