delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/20/23:22:50

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3BAAB25A.1060308@ece.gatech.edu>
Date: Thu, 20 Sep 2001 23:22:02 -0400
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010713
X-Accept-Language: en-us
MIME-Version: 1.0
To: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
CC: Danny Smith <danny_r_smith_2001 AT yahoo DOT co DOT nz>, cygwin AT cygwin DOT com
Subject: Re: binutils.README
References: <20010920000226 DOT 64316 DOT qmail AT web14505 DOT mail DOT yahoo DOT com> <3BA936C1 DOT 5000406 AT ece DOT gatech DOT edu>

--------------080409010702000603050301
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

The behavior reported, in which "long long" and "unsigned long long" 
variables cannot be auto-imported, is not a bug.  It is correct 
behavior.  Binutils correctly flags these variables with the "<variable> 
can't be auto-imported" message, and exits.

The attached tarball can be used to demonstrate this behavior, and 
inspection of the usedll.o file will reveal lines like this:

--relocations--
00000266 dir32             _dll_global_ll_var
0000026c dir32             _dll_global_ll_var

--disassembly--
  265:   a1 00 00 00 00          mov    0x0,%eax
  26a:   8b 15 04 00 00 00       mov    0x4,%edx

Notice that (a) this long long variable is stored as a multiword 
structure, and (b) accesses to the upper word of that structure use the 
'bad' non-zero-addend addressing modes.

Therefore, long long (and unsigned long long) variables are properly 
considered members of the "problematic" class of non-auto-importable 
variables.  The documentation in ld.info gives a number of mechanisms 
that can be used to work around this problem -- but all require source 
code modification, either in the dll or in the client or both.

The ld.info documentation as well as the binutils.README document 
specifically refer to 'arrays' and 'structs' as problementic data types 
for auto-import.  However, that list is not intended to be complete or 
exhaustive; merely representative.

*That* could be made more clear, I suppose.  'arrays' and 'structs' and 
other multi-word variables...

--Chuck

--------------080409010702000603050301
Content-Type: application/octet-stream;
 name="long_long_example.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="long_long_example.tar.gz"

H4sIADuTqjsAA+0YaW/TSLRfmV/x1IBUl9p1TqsprBbSglgVqCi79ANSNLHHySwTT9ZHS4T2
v++b8ZHYTihIUUGsnxJ7jnfNu2bGQgbTsVAP9pnOF4Id7+0cbLtnO04f33bb6dv6jT/1zmHP
drr9Tr/d7vWdPbvdddqdPejvXpU6JFFMQ4A995aLSAZb8d7IgN2HPvcMouZ/d+cR8F3+7/XQ
/7121278fx+wwf+eEJa7SxnK24NBb6v/+46T+d8e9LvK/33bxvy3d6nENvif+7/FA1ckHoN9
7ffZPiEqGkA/CA6N8Rf9k9CQwcFqhhvkCwEIWZyEAXA4BH5K/iXEk8lEsJQwbRfE2ZRXovSQ
0jslitQXksaaULcKOt0Dv0TmI5mvBVaUnQo5oVrnG/TqUzg5QeY3knt6NmJxBWNtSQG7xSGR
sFTSJm4FSll0KrnOu7zSKj/N40e7f1v+z3Yp4878b/dX+d8eqPrvYElo8v8eoMX9wGM+KK+P
Z+OsGnikhYM8YLVxwj7HDMN5lTfbaoRxmuPmmb+tJqww01zfUgMQbbP0SlrlSCrt4a60X8mu
8NyQzsi6xQKP+3B8WDUMHB7/BNn8/VDP/9f0E7pe7DDYVbZ/5fzX7ajaoPK/PXDa6f7f7Q+a
/L8PaJEW5B4HX4YwWk5veWCRFhmNcMubui4ZXV9jy338mJCz8+d/vsSOOQXzAxUCWubbjkJ4
cfHs5RVOPDzQKAYZ1UcuL/Mx85VFLs6K3gdxZJos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yQkyLNMBeDzE3UQsoQbDsh1Kl8kqlxtO9d5EXTwwRlh9/SRwYy6DGpcN
19JvXwqLY65HRKK3LrPbLhaQr23Tdy/E+0YZv5qFOg4eVc1NNtrwUaHjfKugn9hM2edK++f4
PNlAAw000EADDTTQQAMN7BD+A3rTmxcAKAAA

--------------080409010702000603050301
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--------------080409010702000603050301--

- Raw text -


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