Closed
Bug 286506
Opened 20 years ago
Closed 20 years ago
warning: locally defined symbol ... imported in function ...
Categories
(Toolkit Graveyard :: XULRunner, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.8beta2
People
(Reporter: darin.moz, Assigned: darin.moz)
Details
(Keywords: perf)
Attachments
(1 file)
|
4.86 KB,
patch
|
benjamin
:
first-review+
|
Details | Diff | Splinter Review |
While linking xul.dll, we get a ton of these kinds of warnings: docshell.lib(nsMIMEInfoImpl.obj) : warning LNK4217: locally defined symbol ?RemoveCStringA t@nsCStringArray@@QAEHH@Z (public: int __thiscall nsCStringArray::RemoveCStringAt(int)) im ported in function "public: virtual unsigned int __stdcall nsMIMEInfoBase::SetPrimaryExten sion(class nsACString const &)" (?SetPrimaryExtension@nsMIMEInfoBase@@UAGIABVnsACString@@@ Z) I believe that these are caused because we do not compile with _IMPL_NS_COM=1 defined across all translation units that are to be linked into xul.dll. I'm not sure, but I think this means that the compiler is not optimizing the code as well as it could since it'll think that it cannot encode a PC-relative jump for the various function calls. (I'd be surprised if the linker rewrote the code for the various functions where this is happening.) So, we could probably improve performance and codesighs by fixing these warnings. And, even if it doesn't make a significant performance improvement, it'd be nice to clean up the excessive warnings ;-)
| Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.8beta2
Comment 1•20 years ago
|
||
That is a correct assesment of the problem, but it's not easy to fix. There are static libs (rdfutil/unicharutil) that are currently linked into both libxul and non-libxul units. I think this warning is not worth spending time on yet... when the rest of libxul is done (tier 50) and when RDF resource factories are gone.
| Assignee | ||
Comment 2•20 years ago
|
||
well.. solving this should be just as simple as defining _IMPL_NS_COM=1 in the right modules (any that define LIBXUL_LIBRARY I would think). that define has no bearing on what is actually exported from libxul ;-) i agree that we will see this warning for other things that are not part of xpcom, but that should be a much smaller set. i'd like to get the xpcom set taken care of for gecko 1.8.
Comment 3•20 years ago
|
||
LIBXUL_LIBRARY already defines _IMPL_NS_COM. For the vast majority of our code, we do this correctly. The "hard parts" are the static libs I mentioned, which are linked into both libxul and non-libxul code. http://lxr.mozilla.org/mozilla/source/config/config.mk#479
| Assignee | ||
Comment 4•20 years ago
|
||
Ah, so we do. Then, what I see the problem being is that at least in a good number of cases we do not define LIBXUL_LIBRARY when we should. See for example the directories under uriloader/. Shouldn't we specify LIBXUL_LIBRARY in every Makefile that builds object files that will be linked into xul.dll?
Comment 5•20 years ago
|
||
Yes, we should list LIBXUL_LIBRARY in every Makefile that gets linked into xul.dll, except for unicharutil/rdfutil (and maybe one or two others I'm forgetting). Certainly uriloader should have it.
| Assignee | ||
Comment 6•20 years ago
|
||
OK, then I'll write up a patch for that.
| Assignee | ||
Comment 7•20 years ago
|
||
Attachment #177918 -
Flags: first-review?(benjamin)
Updated•20 years ago
|
Attachment #177918 -
Flags: first-review?(benjamin) → first-review+
| Assignee | ||
Comment 8•20 years ago
|
||
fixed-on-trunk resolving this bug as FIXED since the remaining warnings only pertain to unicharutil and rdfutil, which i presume are to be handled in a separate bug.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
Flags: in-testsuite-
Updated•9 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•