delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/05/22:16:01

From: "Andrew Crabtree" <andrewc AT rosemail DOT rose DOT hp DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: wanted: demand zero pages for uninitialized static data
Date: Fri, 5 Jun 1998 17:09:44 -0700
Organization: Hewlett-Packard, Roseville
Lines: 27
Message-ID: <6la1c6$sac$1@rosenews.rose.hp.com>
References: <35787c8c DOT 2850717 AT news1 DOT bway DOT net>
NNTP-Posting-Host: ros51675cra.rose.hp.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>djgpp stub clears the "BSS" section. This causes a lot

This is AFAIK required.  You always assume that an unitialized global is
zeroed.

>Is this a matter of a patch to the stub
Commenting out this would probably do what you want.  Note though that as of
binutils 2.8 ld has its own version of the stub in it, so you would have to
configure that as well, or change the linker script to not use stubbed coff
output.  I would like to say that changing the stub is in no way a good
idea, and I would suggest you live with the paging problems.  That or malloc
the array.

From stub.asm.

 mov es, [client_ds]  ; clear the BSS section
 mov edi, bss_section[s_vaddr]
 mov ecx, bss_section[s_size]
 xor eax,eax
 shr ecx,2
 .addrsize
 rep
 stosd




- Raw text -


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