www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/04/07/11:39:43

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=qRoMq4p3fGCdhxK8NmCnfn323cjdjcwmt60xIwtI8aW5J0bdkQaAb
LTvZzMIbe9UZrzSP8zE33ESZFcDDELRc6RDRAjFFJvYZaituRgfDBhcjFzMTZL/1
y8KZ1W9zEXMMD+wwHq9NHPsaYuvK3HPuZbyqqTt/rqoOVWkSHcqg3E=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=5BfcBU0009MLUbKiinQlrHM9vco=; b=IQEyakdh8NQwlkH/XdEbcGIY0uzS
dGevrxLfdF5cLZD5lEE0M/zEjMjYdjMPlRUcH2os6sniexjfrw/v3VT/ivLNzoRJ
stKFwwPMZy2sjlsPwhEVs3w9ou5Q5xcL06ppjxtT2cOt8lLcs+sYN6o1I+S3PXMD
kTw/e75hMHM3vpw=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Mon, 7 Apr 2014 17:38:56 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Possibly wrong address passed to callq asm instruction within MPIR test binaries
Message-ID: <20140407153856.GA11273@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <lhtve5$ie3$4 AT ger DOT gmane DOT org> <lhtvgh$ie3$5 AT ger DOT gmane DOT org> <lhu212$ie3$6 AT ger DOT gmane DOT org> <20140407113027 DOT GA30595 AT calimero DOT vinschen DOT de> <lhu3dq$ie3$7 AT ger DOT gmane DOT org> <20140407115730 DOT GA721 AT calimero DOT vinschen DOT de> <lhu95j$ie3$8 AT ger DOT gmane DOT org> <lhub63$ie3$9 AT ger DOT gmane DOT org> <20140407143618 DOT GN2061 AT calimero DOT vinschen DOT de> <lhudqt$m6e$1 AT ger DOT gmane DOT org>
MIME-Version: 1.0
In-Reply-To: <lhudqt$m6e$1@ger.gmane.org>
User-Agent: Mutt/1.5.21 (2010-09-15)

--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Apr  7 14:47, Jean-Pierre Flori wrote:
> Le Mon, 07 Apr 2014 16:36:18 +0200, Corinna Vinschen a =C3=A9crit=C2=A0:
> > At this point gcc doesn't know that foo will get exported from a DLL,
> > but it generates the .def directive nevertheless.  If I create the same
> > code in gas:
> >=20
> > 	.text .globl nothing .def   nothing; .scl 2; .type 32; .endef
> > nothing:
> > 	ret
> >=20
> > then it works, but crashes if I omit the .def directive.  So it seems to
> > me you don't have to export the symbol using the dllimport/dllexport
> > directives, but you have to specify the symbol explicitely for export.
> >=20
> Exactly!
> I came to the same conclusion.
> On top of that, it seems that including the export stuff does not hurt=20
> when building and linking a static lib.
>=20
> What's strange is that when we use the dllimport magic then it works even=
=20
> though the symbol was not explicitely exported.

Perhaps not.  With dllimport, the calling code expects having to import
a symbol from the DLL, so it generates an IAT entry and everything works
as expected.  Along these lines, at least.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--AhhlLboLdkugWU4S
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJTQsaQAAoJEPU2Bp2uRE+gC7EP/jSitZ1KnTsQbXxD0HmKUOvv
obOqaKPUZ4q8E576gRZVqFzsO5WQgWRXqw3NMZ/1+Oik3DQtByhhwhBEMZWOThiA
hlZbDLgas8Slqig0EnR4Hw6Pv2CWMrgdFtjiIo5cIfAsud0JUdy3oC7oEfOKQh9j
rvjhIqDaf+vJXxiJ1Bc7GAJfQuuy0oZKab+ZNR3ipVM660Qr6BqhfuayXKz524e7
Tlu6RveSIFjHuf+L1j+eXfRSsVc3or8+Mh8v0kgAq2+LNmXIbwImMJ+K1ySr6RVU
UhBA5NqVZYjrXLdrys5wYUxgx/IdXTESFZ12HU9nXX9N0QpHxXVEq844i8uOvURp
Iae2e8n9rfhtr3/huple5V0U60kDYWoB/RkzdobPEf6KOe1bt4H8Yg6cQDWYi9j0
JFz3yRgAg4QT0lS60cFBm/G0rcAxszXkMUn8Q3zLpDzZDeGgNdCQIsS/HkAryD+4
fcTPffe9sQheIct/7c1sCfz+UAO7WrJu50zI63wEWypwpKpuNgv4XzsJSkKAja/C
91m8YoMis3solb3z+jNknmkoq91C9Sl+mnPB3NxQIT5UgnANnQk/RPYrxL2loBes
qkpD0Wyrq2wmTaSIwkgMtEZtmreju+TP8lxf6kng6GRW7WvZmqiuW9USdj9qWqAb
CFgYy3QwCgNE4hLE4TyL
=eYqT
-----END PGP SIGNATURE-----

--AhhlLboLdkugWU4S--

- Raw text -


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