Subject: Re: .def file support broken in [curr] release of binutils
From: "Conrad Scott" <[email-masked]>
To: "Max Bowsher" <[email-masked]>
Cc: <[email-masked]>
Date: Mon, 12 Aug 2002 13:08:07 +0100

"Max Bowsher" <[email-masked]> wrote:
> With [curr] binutils, ld fails when given a .def file.
>
> In normal mode, it segfaults. In -mno-cygwin mode, it fails
trying to allocate a
> huge (640MB) amount of memory.
>
> Tiny testcase attached. (Just run make)
>
> I posted about this before but received no answer. Can anyone
confirm whether it
> is just my installation, or a genuine bug?

On a win2k box running latest everything w/ CVS cygwin DLL w/
debugging enabled:

$ cygcheck -c binutils
Cygwin Package Information
Package             Version
binutils            20020706-2

$ make all
gcc -c -O2 -Wall testcase.c -o testcase.o
dlltool -z testcase.def --export-all-symbols testcase.o
gcc -shared testcase.o testcase.def -s -o cygtestcase.dll
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwi
n/bin/ld: testcase.def:2: syntax error

$ gdb -nw ld ld.exe.core
GNU gdb 2002-07-19-cvs (cygwin-special)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License,
and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i686-pc-cygwin"...(no debugging
symbols found)...

warning: core file may not match specified executable file.
00400000:C:/cygwin/bin/ld.exe (symbols previously loaded)

#0  0x610a2ea1 in strlen ()
(gdb) where
#0  0x610a2ea1 in strlen ()
#1  0x00485b4a in _size_of_stack_reserve__ ()
#2  0x00434625 in _size_of_stack_reserve__ ()
#3  0x00429955 in _size_of_stack_reserve__ ()
#4  0x00423eae in _size_of_stack_reserve__ ()
#5  0x0041b8a2 in _size_of_stack_reserve__ ()
#6  0x0041eebc in _size_of_stack_reserve__ ()
#7  0x610060a9 in dll_crt0_1 () at
../../../../HEAD/winsup/cygwin/dcrt0.cc:784
#8  0x61006526 in _dll_crt0 () at
../../../../HEAD/winsup/cygwin/dcrt0.cc:907
#9  0x61006565 in dll_crt0 (uptr=0x0)
    at ../../../../HEAD/winsup/cygwin/dcrt0.cc:920
#10 0x00497b62 in _size_of_stack_reserve__ ()
#11 0x0040103c in _size_of_stack_reserve__ ()
#12 0x77ea847c in _system_dlls__ ()
Current language:  auto; currently c++
(gdb)

HTH,

// Conrad

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