This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: ordinal linking for cygwin ld
- From: "Ralf Habacker" <Ralf dot Habacker at freenet dot de>
- To: <kde-cygwin at mail dot kde dot org>,"Ralf Habacker" <Ralf dot Habacker at freenet dot de>,"Charles Wilson" <cwilson at ece dot gatech dot edu>
- Cc: "Binutils" <binutils at sources dot redhat dot com>,"Cygwin-Apps" <cygwin-apps at cygwin dot com>
- Date: Sun, 28 Apr 2002 14:17:38 +0200
- Subject: RE: ordinal linking for cygwin ld
> Mostly. I'm a bit rusty - it's been a while since I grokked the
> auto-import stuff. I'm getting back into it at the moment. The thing
> that I don't follow at the moment is the how the linker fixup places the
> exported data -variable- at a fixed rva at dll load time. The IAT is
> -meant- to point straight to functions after the fixup occurs, so
> pointing at an address in the .dll .text segment is fine.
^^^^
Not into the dll, into the client code.
objdump -D client.exe
<snip>
401063: a1 b8 40 40 00 mov 0x4040b8,%eax
| ^^^^^^^^^^
opcode address
00401064 :
Firstthunk points to 0x401064, the symbol <__fu0__var0000>, which is the address
part of the mov instruction. After run time linking the loader has relocated
this address to the propper value.
401063: a1 ab cd ef 00 mov 0x00efcdab,%eax
Ralf