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

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_00,SARE_BAYES_5x8,SARE_BAYES_6x8,TVD_RCVD_IP
X-Spam-Check-By: sourceware.org
Date: Sun, 15 Mar 2009 14:22:30 -0700 (PDT)
From: "Peter A. Castro" <doctor AT fruitbat DOT org>
To: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: under cygwin, zsh cannot run when built against ncurses9-5.7-13
In-Reply-To: <49BD16E3.3090506@gmail.com>
Message-ID: <Pine.LNX.4.64.0903151315370.9859@gremlin.fruitbat.org>
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>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

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

-- 
Peter A. Castro <doctor AT fruitbat DOT org> or <Peter DOT Castro AT oracle DOT com>
 	"Cats are just autistic Dogs" -- Dr. Tony Attwood

--
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