Re: [AD] Fixdll.bat for gcc-3.exe

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 15.07.2009 20:54, Milan Mimica wrote:
Evert Glebbeek wrote:

 Doesn't that depend on whether symbols are found in the DLL by symbol
 name or by index?

It does, but do you have a choice? I couldn't find a way.



I think this as been discussed before, but here goes...

How the import lib was created decides if the exe will import symbols by ordinal or by name. That would mean that since the A5 .def file specifices the ordinals, and the linker uses the .def when creating the import lib, ordinals are currently being used. But as long as NONAME isn't specified in the .def, the DLL will still export the symbols both by name and ordinal.

It should be ok to dump the def file and just use declspec(dllexport) instead. According to [1], the penalty for importing by name is negligible. A better reason for using ordinals would be to save space, but Allegro doesn't export that many symbols. The symbol names currently occupy about 50 kB in the DLL.


The Borland .def file renames the symbols, so I guess that has to stay if bcc is still to be supported. Which I suppose it isn't.


http://msdn.microsoft.com/en-us/magazine/bb985014.aspx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/