Mail Archives: djgpp-workers/2001/08/03/10:32:50
> > Should I still go ahead with this or just try Charles's Windows 2000/sbrk
> > source patch and see what occurs?
>
> I'd say try Charles's patch, it's easier.
It's also what's going to eventually go into the release, so we might as
well start testing now. All that's really needed is the new label 14: and
the "js 14b".
> > The patch only appears to work on the standard DJ203 binaries from Simtel,
> > not the ones I have built using the CVS tarball.
Foo. I feared that might be the case - something in the build environement
changes an offset. It's a 10 minute fix, but I want to finish the real
sbrk patch first. The binary patch was actually the easiest way for me
to "test" the algorithm on a wide range of nested images. I didn't have
time to download GCC source and do a build.
By the way, via private email someone from the newsgroup has been desparate
to work on Win2K and tested both the binary patches for NTVDM and sbrk
and reports a mostly functional system (with workarounds).
> Charles, could you please publish the patch against the CVS version of
> crt0.S?
I originally had planned to finish and send it out yesterday, but my
wife had other plans ... This weekend I'll finish. Hopefully...
I put two patches in the zip file - one was the "quick hack" for testing:
*** crt0.203 Wed Aug 1 20:28:48 2001
--- crt0p.S Wed Aug 1 21:57:18 2001
***************
*** 500,504 ****
/* Current allocation not large enough, get another block */
10: movl %ecx, %eax /* Add amt */
! pushl %eax /* Save orig */
addl $0x0000ffff, %eax /* round up to 64K block */
andl $0xffff0000, %eax
--- 500,504 ----
/* Current allocation not large enough, get another block */
10: movl %ecx, %eax /* Add amt */
! 14: pushl %eax /* Save orig */
addl $0x0000ffff, %eax /* round up to 64K block */
andl $0xffff0000, %eax
***************
*** 519,522 ****
--- 519,523 ----
popl %ecx /* Linear address */
subl ___djgpp_base_address, %ecx /* New dpmi size */
+ js 14b
cmpl %ecx, __what_size_dpmi_thinks_we_are /* Back to back ? */
je 4f
The one listed below is closer to the final - but it's incomplete since
the new "flag" I defined isn't automatically set anyplace. So patching
based on below wouldn't change anything yet unless you futzed with crt0
flags.
*** crt0.203 Wed Aug 1 20:28:48 2001
--- crt0.S Wed Aug 1 21:05:00 2001
***************
*** 500,504 ****
/* Current allocation not large enough, get another block */
10: movl %ecx, %eax /* Add amt */
! pushl %eax /* Save orig */
addl $0x0000ffff, %eax /* round up to 64K block */
andl $0xffff0000, %eax
--- 500,504 ----
/* Current allocation not large enough, get another block */
10: movl %ecx, %eax /* Add amt */
! 14: pushl %eax /* Save orig */
addl $0x0000ffff, %eax /* round up to 64K block */
andl $0xffff0000, %eax
***************
*** 512,521 ****
jc brk_error
- pushl %edx /* Size */
- call lock_memory
-
pushw %bx
pushw %cx
popl %ecx /* Linear address */
subl ___djgpp_base_address, %ecx /* New dpmi size */
cmpl %ecx, __what_size_dpmi_thinks_we_are /* Back to back ? */
--- 512,526 ----
jc brk_error
pushw %bx
pushw %cx
popl %ecx /* Linear address */
+ cmpl ___djgpp_base_address, %ecx /* New dpmi size */
+ jns 15f /* Ignore this block */
+ testb $0x80, __crt0_startup_flags+1 /* include/crt0.h */
+ jnz 14b
+ 15:
+ pushl %edx /* Size */
+ call lock_memory
+
subl ___djgpp_base_address, %ecx /* New dpmi size */
cmpl %ecx, __what_size_dpmi_thinks_we_are /* Back to back ? */
- Raw text -