From: Kai T. <kti...@go...> - 2011-11-18 20:39:23
|
2011/11/18 Earnie <ea...@us...>: > Kai Tietz wrote: >> 2011/11/18 Earnie <ea...@us...>: >>> XMLPUBVAR is defined as '__declspec(dllexport)' when IN_LIBXML is >>> defined and is defined as '__declspec(dllimport) extern' when it is not >>> defined. IN_LIBXML is defined explicitly in the source files that create >>> the DLL. The using programs do not define IN_LIBXML. >> >> Correct, this is exactly the issue. The issue caused by the DLL >> itself, not by the user. As each time this header gets included by >> the build of the DLL, as much TUs have their own variable (and an >> empty one). This would at least would be a cause why you are seeing >> here an empty variable. But well, maybe there is another issue too in >> this library. >> > > So doing: > > #define XMLPUBVAR __declspec(dllexport) extern > > corrects not only this issue but also removes a warning for another > variable. > >> It would be interesting to see the export-table of the libxml DLL >> itself. Is there only one export and where it gets bound? To data or >> to bss? >> > > How do I determine that? Well, you can look into dump of 'objdump -x' for this DLL and see the RVA-export for this export. Then look up section-table in this dump within what range this RVA is. It is a bit copious, but well ... > Thanks Kai for persisting with this; now I'll > be able to provide libxml with a simple patch. np > -- > Earnie > -- https://sites.google.com/site/earnieboyd/ Kai |