Fragile ABI
R Grocott
rgrocottbugzilla at gmail.com
Fri Aug 17 07:13:10 PDT 2012
On Friday, 17 August 2012 at 13:42:27 UTC, Michel Fortin wrote:
> It's certainly doable if you put it at the right place. But
> druntime is not the one in charge of dynamic linking: the
> dynamic linker from the OS is, so that's the ideal place to do
> such a thing. If you want to do it in druntime it'll be a huge
> hassle, if doable at all it'll probably break easily. But on
> the OS side you hit a rock because of different approach to
> dynamic linking (Windows does not really have a dynamic linker).
So basically, any system to create a more sensible ABI needs to
built on top of the C ABI, name mangling, editable vtables, and
nothing else? Ouch.
If druntime can't detect whether symbols were dynamically or
statically linked, does that mean that your system would add an
overhead to *all* virtual function calls, not just those which
call into a dynamic library? If so, that'd be a pretty strong
argument against implementing anything like it, unless it's
something which has to be explicitly switched on (using, say, an
"extern(D_FlexibleABI)" statement).
More information about the Digitalmars-d
mailing list