delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/16/13:59:38

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SARE_BAYES_5x8,SARE_BAYES_6x8
X-Spam-Check-By: sourceware.org
Message-ID: <49BEA14A.6020905@quicknet.nl>
Date: Mon, 16 Mar 2009 19:58:18 +0100
From: "A.R. Burgers" <a DOT rburgers AT quicknet DOT nl>
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
Newsgroups: gmane.os.cygwin
To: cygwin AT cygwin DOT com
Subject: Re: under cygwin, zsh cannot run when built against ncurses9-5.7-13
References: <20a807210903131414g62e0a53cyefd3938c3fe8af33 AT mail DOT gmail DOT com> <49BADAC1 DOT 80709 AT cwilson DOT fastmail DOT fm> <gpf7kk$2g6$1 AT ger DOT gmane DOT org> <gpfcdo$a30$1 AT ger DOT gmane DOT org> <gpgeu9$iuo$1 AT ger DOT gmane DOT org> <Pine DOT LNX DOT 4 DOT 64 DOT 0903142203230 DOT 9859 AT gremlin DOT fruitbat DOT org> <49BD16E3 DOT 3090506 AT gmail DOT com> <Pine DOT LNX DOT 4 DOT 64 DOT 0903151315370 DOT 9859 AT gremlin DOT fruitbat DOT org>
In-Reply-To: <Pine.LNX.4.64.0903151315370.9859@gremlin.fruitbat.org>
X-MailScanner-ID: 1LjI1w-0000nO-Jj
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

Any special reason for specifying -lm and -lc when building d3.dll?
Without them, pow is mentioned only once in the objdump output. However 
on 1.5 pow is mentioned only once, even if -lm and -lc
are specified.

The exact same problem as with zsh, I also run into with fltk's 
fluid.exe (from current 1.3 svn) on cygwin 1.7 and gcc 3.4.4.
fltk btw does not link to curses libraries.

Teun

Peter A. Castro schreef:

> On Sun, 15 Mar 2009, Dave Korn wrote:
> 
> Hi Dave!
> 
>> Peter A. Castro wrote:
>>
>>>   Using the Dependency Walker tool that Chuck pointed out (thanks
>>> Chuck!)
>>
>>  No problem, Basil!
> 
> "Basil!"  I love it! (you know I was just kidding! :-)
> 
>>> Could this really be a linker problem?
>>
>>  If it's not a linker problem, it has to be a faulty import library.  
>> I can't
>> think of any other option that would explain how that import table got 
>> munged
>> like that.  I'll see if I can reproduce it.
> 
> I've been extracting modules from the import libs and dumping
> import/export symbols from the two libncurses DLLs, but I can't seem to
> find anything that looks wrong.
> 
> However... this I find strange:
> 
> file d3.c:
> ----------------------------------------------------------------
> #include <math.h>
> 
> double my_pow( double d1, double d2 )
> {
>   double d;
>   d = pow(d1,d2);
>   return d;
> }
> ----------------------------------------------------------------
> 
> $ gcc -g -shared -o d3.dll d3.c -lm -lc
> $ objdump -x d3.dll
> 
> ...
> There is an import table in .idata at 0x10004000
> 
> The Import Tables (interpreted .idata section contents)
>  vma:            Hint    Time      Forward  DLL       First
>                  Table   Stamp     Chain    Name      Thunk
>  00004000       00004050 00000000 00000000 0000416c 00004084
> 
>         DLL Name: cygwin1.dll
>         vma:  Hint/Ord Member-Name Bound-To
>         40b8      351  _impure_ptr
>         40c8      720  calloc
>         40d4      779  cygwin_detach_dll
>         40e8      781  cygwin_internal
>         40fc      802  dll_dllcrt0
>         410c      917  free
>         4114     1186  malloc
>         4120     1395  realloc
>         412c     1285  pow
> 
>  00004014       00004070 00000000 00000000 0000416c 000040a4
> 
>         DLL Name: cygwin1.dll
>         vma:  Hint/Ord Member-Name Bound-To
>         412c     1285  pow
> 
>  00004028       0000407c 00000000 00000000 0000417c 000040b0
> 
>         DLL Name: KERNEL32.dll
>         vma:  Hint/Ord Member-Name Bound-To
>         4134      337  GetModuleHandleA
> 
>  0000403c       00000000 00000000 00000000 00000000 00000000
> ...
> 
> 
> Why is 'pow' being pulled in twice?  Maybe it's really the math lib stuff
> that's tickling the linker?  This is kinda looking more like some linker
> bug.  Again, I'm not sure where to go next.  It's been a while since I
> dug into gcc...
> 
>>    cheers,
>>      DaveK
> 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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