delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/07/10/15:31:07

From: jont AT harlequin DOT co DOT uk (Jon Thackray)
Subject: More relocatable dll woes
10 Jul 1997 15:31:07 -0700 :
Sender: mail AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199707101436.PAA27859.cygnus.gnu-win32@zaphod.long.harlequin.co.uk>
Original-To: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

It would appear that the export table of a dll, and the set of defined
symbols from a .lib file, don't always match up. This is causing me
problems trying to run my relocatable dll, which complains it can't
find a symbol in a dll it references. Typically what happens is that
the import mechanism is referencing _foo, whereas the export mechanism
has defined foo. I include some examples of this from kernel32.a It
isn't clear to me, but I assume that ld is responsible for building
the import table of the dll it is producing, in which case I have to
assume that link is doing some magic when producing this in order to
make the matchup work. Can anyone shed any light on this?

nm kernel32.lib | grep " T "
00000000 T _AddAtomA AT 4
00000000 T _AddAtomW AT 4

dumpbin /exports C:\WINNT4.0\system32\kernel32.dll
Microsoft (R) COFF Binary File Dumper Version 4.20.6164
Copyright (C) Microsoft Corp 1992-1996. All rights reserved.


Dump of file C:\WINNT4.0\system32\kernel32.dll

File Type: DLL

         Section contains the following Exports for KERNEL32.dll

                   0 characteristics
            31F7E30F time date stamp Thu Jul 25 22:11:43 1996
                0.00 version
                   1 ordinal base
                 675 number of functions
                 675 number of names

            ordinal hint   name

                  1    0   AddAtomA  (000079CA)
                  2    1   AddAtomW  (00004499)
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019