This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: new runtime pseudo-reloc in cygwin 1.3.18


Alexander Gottwald wrote:
and lib/font/Xfont-def.cpp was missing. I generated the file and attached it to this mail. Maybe we can remove these dependencies. Or do we still need these files, even with autoimport?
It's really a case of whether auto-*export* is working. As is, ld will automatically export all symbols, unless:
1) you explicitly specify a .def file, or
2) ANY of your object files contain ANY symbol that is *already* marked with __declspec(dllexport). In that case, ld figures that you'd've marked every symbol you want to export and won't automatically add anything to the export list.

2) sometimes leads to non-intuitive behavior (e.g. glib, where Tor explicitly marked ONLY those symbols that were multi-word data items -- that is, where runtime-pseudo-relocs would be used in newer ld's -- and thus, ONLY those five symbols get exported, unless a .def file is used. Which is way more difficult to do with libtool than it should be. Sigh.

If either 1) or 2) is true, but you WANT additional exports, you can either

a) explicitly specify --export-all-symbols on the link line
b) create and use a .def file if you were not previously doing so, or add the additional symbols to the .def file if you were already using one.

So, the question is: "Is any symbol in the XFree86 codebase explicitly marked with __declspec(dllexport) when compiled for cygwin?" YES: then you DO need to keep the .def file (and note that ld is sensitive to whether the filename ends in ".def") or you must explicitly specify "--export-all-symbols" on the link line. NO: then the .def file can be discarded, and you can rely on the implicit export-all-symbols behavior (unless you want to restrict the export list to some subset of "all symbols").

(Oh, and the .def file does give you the in-built LIBRARY VERSION string...if that's important)

But some programs (xedit, viewres, xmessage) report an runtime error
Error: Unresolved inheritance operation
Dunno about this.

--Chuck


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]