delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2013/06/12/17:02:26

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
MIME-version: 1.0
Message-id: <FB7D87DBD3034B17BC8CE6EEFC6D0551@dev.null>
From: Gisle Vanem <gvanem AT broadpark DOT no>
To: djgpp <djgpp AT delorie DOT com>
References: <f941b346-d6ba-4d9e-b5c4-ef8dc898e433 AT googlegroups DOT com>
<5868dad2-7c06-4436-b516-d5025e8c8b0d AT o8g2000yqa DOT googlegroups DOT com>
Subject: Re: Incorrect compilation
Date: Wed, 12 Jun 2013 22:01:59 +0200
X-Priority: 3
X-MSMail-priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.5931
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
Reply-To: djgpp AT delorie DOT com

"Juan Manuel Guerrero" <juan DOT guerrero AT gmx DOT de> wrote:

> I do not know what is wrong there.
> But it is known that the original sources of the Watt-32 library
> as downloaded from  http://home.broadpark.no/~gvanem/ no longer
> compiles with djgpp.

How is that? Can you be more specific.

I just compiled that old version with djgpp 2.04 and gcc 4.8.1. 
But I had to make 1 change; the ./util/dj_err.exe program needed 
to be recomiled with:
 make -f errnos.mak dj_err.exe

before doing a "configur.bat djgpp" in ./src. That's because djgpp 2.04
did change some <errno.h> values since dj_err.exe was built in 2006.
And the '-gcoff' flag in src/Makefile.all should be dropped. Otherwise
I'm not aware of any programs with this old package.

I know it's been a long time (2006) since my Watt-32 was released
last time. It's no longer a demand for any DOS versions of it. But
I'm still working  on it from time to time. Expesially supporting Win32
and Win64 targets using esp. MingW.

But back to the OP's problem with the disassembling. I jut tried with
the Watcom disassembler wdis. It produced this output which seems
correct to me:

0000                          _pkt_release:
0000    83 EC 1C                  sub         esp,0x0000001c
0003    FA                        cli
0004    A1 00 00 00 00            mov         eax,dword ptr .bss
0009    85 C0                     test        eax,eax
000B    74 31                     je          X$304
000D    8B 15 30 07 00 00         mov         edx,dword ptr .bss+0x730
....
004C    8B 0D 00 00 00 00         mov         ecx,dword ptr __watt_fatal_error
0052    66 C7 40 02 00 00         mov         word ptr 0x2[eax],0x0000
0058    66 C7 00 00 00            mov         word ptr [eax],0x0000
005D    85 C9                     test        ecx,ecx
005F    75 18                     jne         X$305
0061    C7 44 24 08 49 03 00 00
                                  mov         dword ptr 0x8[esp],0x00000349
0069    C7 44 24 04 7D 00 00 00
                                  mov         dword ptr 0x4[esp],.text+0x7d
0071    89 04 24                  mov         dword ptr [esp],eax
0074    E8 87 FF FF FF            call        j^_Fortify_free
0079                          X$305:
0079    C7 05 00 00 00 00 00 00 00 00
                                  mov         dword ptr .bss,0x00000000
0083    FB                        sti
0084    B8 01 00 00 00            mov         eax,0x00000001
0089    83 C4 1C                  add         esp,0x0000001c
008C    C3                        ret

--gv

- Raw text -


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