under cygwin, zsh cannot run when built against ncurses9-5.7-13

Peter A. Castro doctor@fruitbat.org
Sun Mar 15 21:24:00 GMT 2009

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@fruitbat.org> or <Peter.Castro@oracle.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/

More information about the Cygwin mailing list