This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/40068] GCC fails to apply dllexport attribute to typeinfo.
- From: "dave dot korn dot cygwin at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2009 15:37:06 -0000
- Subject: [Bug target/40068] GCC fails to apply dllexport attribute to typeinfo.
- References: <bug-40068-9431@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from dave dot korn dot cygwin at gmail dot com 2009-06-25 15:37 -------
Hmm, I'm getting somewhere with this.
By compiling the g++ testsuite "ptrflags.C" case with --save-temps, manually
hacking all the superfluous typeinfo stuff out, and re-assembling and linking
it, I can turn a FAIL into a PASS, with all the typeinfo and related stuff
being imported from the DLL.
So I think typeinfo can be made to work, and work with both
__GXX_MERGED_TYPEINFO_NAMES and __GXX_TYPEINFO_EQUALITY_INLINE.
All I need to do is stop the compiler from emitting comdat definitions of
items with vague linkage when they are dllimported, or perhaps make the linker
prefer an import over a comdat section when the same symbol could be resolved
by either. Or perhaps both. I think the linker fix is what you were
suggesting when you said
> since if we depend on auto-import than
> we should treat dll imports thae same as static lib imports
More later.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40068