www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2002/04/28/08:18:25

Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm
Sender: cygwin-apps-owner AT cygwin DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT cygwin DOT com>
List-Help: <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs>
Mail-Followup-To: cygwin-apps AT cygwin DOT com
Delivered-To: mailing list cygwin-apps AT cygwin DOT com
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>
Subject: RE: ordinal linking for cygwin ld
Date: Sun, 28 Apr 2002 14:17:38 +0200
Message-ID: <001b01c1eeae$afa0b670$d36707d5@BRAMSCHE>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
In-Reply-To: <FC169E059D1A0442A04C40F86D9BA7600C5F35@itdomain003.itdomain.net.au>
Importance: Normal

> 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



- Raw text -


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