From: tvoverbe@wk.estec.esa.nl (Ton van Overbeek)
Subject: Re: How to build Matlab 5 MEX files with the GNU-Win32 tools
8 Jul 1997 06:54:41 -0700
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <33C21FBB.794BDF32.cygnus.gnu-win32@wk.estec.esa.nl>
References: <33C2172E.41C67EA6@wk.estec.esa.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01 (X11; I; SunOS 4.1.3_U1 sun4m)
Original-Cc: gnu-win32@cygnus.com, chj@lin.foa.se, wgreathouse@smva.com
Original-Sender: owner-gnu-win32@cygnus.com

OOPS,

I made an error in the build.sh script in my previous posting.
The error is in the part:

> # Create fixup.o which is needed to terminate the
> # import list and the relocation section in the dll.
> cat > fixup.c << EOF
> /* Copied from winsup/dcrt0.cc in the cygwin32 source distribution. */
>         asm(".section .idata\$3\n" ".long 0,0,0,0, 0,0,0,0");
> /* Next one is needed to properly terminate the .reloc section in the dll */
>         asm(".section .reloc\n" ".long 0,8");
> EOF
 
The addition to the .reloc section does not belong there any more.
If you include this, peclean will most probably crash under Win95.
So the correct form is:
> # Create fixup.o which is needed to terminate the import list.
> cat > fixup.c << EOF
> /* Copied from winsup/dcrt0.cc in the cygwin32 source distribution. */
>         asm(".section .idata\$3\n" ".long 0,0,0,0, 0,0,0,0");
> EOF

Note for Mr. Greathouse and other DLL/PE format experts: With the extra
relocation chunk with 0 fixups the DLL loads properly under Win95, even
with cruft at the end of the .reloc section, but peclean crashes (access
violation in the c runtime dll). 

Ton van Overbeek, tvoverbe@wk.estec.esa.nl
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
