DLL symbol identity
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Mon May 11 07:57:59 PDT 2015
Thanks for the insight into how this affects MSVC++, too.
How much work do you think would have to be done at startup of
an application like Firefox or QtCreator if they were not in
C++, but D?
Most of us have no idea what the algorithm would look like and
what data sets to expect.
I guess you'd have to collect all the imported symbols from
all exe/dll modules and put the list of addresses for each
unique symbol into some multi-set that maps symbol names to a
list of adresses:
"abc" -> [a.dll @ 0x359428F0, b.dll @ 0x5E30A410]
"def" -> [b.dll @ 0x38C3D200]
Then the symbol name is no longer relevant so it can be
thought of as an array of address arrays
[
[0x359428F0, 0x5E30A410],
[0x38C3D200]
]
where you pick one item from each of the arrays (e.g. the
first one and map all others to that):
0x359428F0 -> 0x359428F0
0x5E30A410 -> 0x359428F0
0x38C3D200 -> 0x38C3D200
Then you go through all import address tables and perform
the above remapping to make symbols unique.
Is that what would happen?
--
Marco
More information about the Digitalmars-d
mailing list