Mail Archives: djgpp/2012/11/23/17:51:04
Am 23.11.2012 04:25, schrieb RayeR:
> I can confirm this behavior on my system:
> MS-DOS 6.22, djdev 2.04, gcc 4.7.2, bnu 2.23.1, doslfn 0.41b
> the compiled file was crashed after loading doslnf - I can see most binary middle of the file was zero bytes - file was corrupted.
> Then I installed updated doslfn 0.41c and problem has gone, the compied exe works fine.
> Thx for pointing and fixing this bug.
>
Only for the record: around September 2011 I pointed out that the libc version
build from DJGPP's cvs repository code did not work on MSDOS with some DOSLFN
drivers. An inspection of the code showed that for all calls to 0x71XX functions
the carry flag was never set before the call was issued. It concerned the
following C functions with calls to 0x710D, 0x7160, 0x713B, 0x71A1, 0x7147,
0x713A, 0x71A6, 0x716C, 0x7143, 0x7141, 0x714E, 0x714F, 0x71A8 and 0x71A0:
src/libc/dos/io/flushdc.c,
src/libcdos/process/dosexec.c,
src/libc/posix/sys/stat/fixpath.c,
src/libc/posix/dirent/opendir.c,
src/libc/posix/unistd/getcwd.c,
src/libc/posix/sys/stat/mkdir.c,
src/libc/posix/unistd/rmdir.c,
src/libc/posix/unistd/chdir.c,
src/libc/posix/sys/stat/filelen.c,
src/libc/posix/sys/stat/lfilelen.c,
src/libc/posix/sys/stat/fstat.c,
src/libc/posix/sys/stat/fchmod.c,
src/libc/dos/io/_open.c,
src/libc/dos/io/_chmod.c,
src/libc/dos/io/_creat_n.c,
src/libc/dos/io/_creat.c,
src/libc/ansi/stdio/remove.c,
src/libc/ansi/stdio/findfirs.c,
src/libc/ansi/stdio/findnext.c,
src/libc/dos/dos/truename.c,
src/libc/dos/lfn/lfnshort.c,
src/libc/dos/lfn/_use_lfn.c,
src/libc/ansi/stdio/_rename.c
The bug was fixed by the patch presented and committed at thread:
<http://www.delorie.com/archives/browse.cgi?p=djgpp-workers/2011/09/28/16:40:16>
I have checked with all DOSLFN driver versions available at
<http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/system/doslfn>
using stock djdev204.zip from /beta directory and a version of libc compiled
from code of the DJGPP CVS repository. The table below summarizes the result:
doslfn(m).com | md5sum | beta | repo
-----------------+----------------------------------+------+------
doslfnjh-0.33 | 84acdb62077edcf9d2f176b36e8b8b57 | OK | OK
doslfnm-0.34 | a789c9d75fe09e794577f7cdf931aee7 | OK | OK
doslfnm-0.34d | 9287f71e0c466a97be9a34779a5ac00e | KO | OK
doslfn-0.40 | 9564bf067e1187f74dd6b3f79f3177e3 | OK | OK
doslfn-0.40a | 6ff5150d55b7e83891ed3772021c23ef | OK | OK
doslfn-0.40e | 2832bf3e79d31f4ca3c61fcf471f387f | KO | OK
doslfn041 | 9d5b5bad0d78e81cae5f4ab9282bec3d | KO | OK
doslfn041a | 648ded3978152ee87aec1bc6fca63808 | KO | OK
doslfn041b | e69363d404e5d9466f680f7ddd567d50 | KO | OK
doslfn041c | 9a3f1b63951737b892d7ed2ca25c5a53 | OK | OK
beta : gcc472b, bnu2231b and djdev204 from /beta directory.
repo : gcc472b from /beta directory and bnu2231b rebuild
using a freshly compiled libc from cvs repository.
The linker must be recompiled with the fixed library or
broken exe files will be created. For the test program
it was not necessary neither to replace gcc.exe nor as.exe.
This may be not true for larger programs.
Regards,
Juan M .Guerrero
- Raw text -