This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Getting GCC to always dllimport vtables on X86?


Hi,


Sure hope I've come to the right place...

I need to somehow persuade GCC (on x86) to always treat vtables as if
they were dllimport'ed. For linking to work on my target platform (a
custom X86 OS) it's important that constructors reference vtables
indirectly (i.e. through pointers in idata). The other side of this
coin is a small hack to ld to allow dllimports to work, not just from
importing modules, but from the exporting module as well (i.e. __imp__
symbols for vtables get created automatically once ld detects its
unresolved).

Is there anyone here who would be willing to show me the way with
this? Although I am a proficient C/C++ programmer, I am a GNU noob and
the GCC source code scares me... :-)  I think I've found the right
place in GCC - import_export_vtable in decl2.c - but am at a loss to
understand the ld source.

Many thanks,


-- Reuben Harris


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