Modern C++ Lamentations
Rubn
where at is.this
Fri Jan 4 00:25:19 UTC 2019
On Thursday, 3 January 2019 at 21:22:03 UTC, Ethan wrote:
> On Thursday, 3 January 2019 at 19:36:52 UTC, Jonathan M Davis
> wrote:
>>From the last time I worked with Windows dlls, I remember quite
>>distinctly
>> that doing anything like adding a symbol to the library meant
>> that it was incompatible with executables previously built
>> with it (which is not true for shared libraries on *nix - they
>> only break if the ABI for the existing symbols changes).
>
> That would surely break if you were looking up symbols by
> ordinal instead of by name. I didn't even know you could do
> that until I read the documentation for GetProcAddress closely
> - turns out the name parameter can be used as an ordinal.
>
> All exportable symbols are exported by their mangled name in to
> the DLL's export table. Resolving by mangle will give you a
> similar experience to *nix there.
Even if you used ordinal values instead, you need to assign the
symbol a specific ordinal value. The only reason you would have
to relink the executable is if you changed the ordinal values to
be incompatible with the previous layout, eg assigning a new
function to have a ordinal value the same to one that was
previously assigned to different function. The equivalent to
removing a symbol resolving by name on *nix/Windows.
More information about the Digitalmars-d
mailing list