www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/10/27/13:25:16

Xref: news-dnh.mv.net comp.os.msdos.djgpp:2901
Path: news-dnh.mv.net!mv!news.sprintlink.net!newsfeed.internetmci.com!news.mathworks.com!news.kei.com!ub!dsinc!newsfeed.pitt.edu!nntp.club.cc.cmu.edu!cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!newsfeed.rice.edu!rice!news!sandmann
From: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Weird stuff in COFF files
Date: Fri, 27 Oct 1995 09:28:04 CDT
Organization: Rice University, Houston, Texas
Lines: 15
References: <DH3ysu DOT 159 AT jade DOT mv DOT net>
Reply-To: sandmann AT clio DOT rice DOT edu
Nntp-Posting-Host: clio.rice.edu
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

> revealed even stranger things. The end of COFF file was filled with a lot of 
> apparently unnecessary stuff like functions identifiers and assembly labels.
> Even worse : in some cases I found a partial copy of my directory tree and/or
> pieces of C source. Worth mentioning : my program behaves identically each time

This happens because the various image sections (code, data) get aligned on
4Kb boundaries in your image to improve demand paging performance with GO32.
When aligning, the extra file space is not cleared so you get information
from DOS's buffers or off the disk.

You can change this behavior with an ld script so that alignment only happens
on 512 byte boundaries - which I don't think will make a significant difference
in performance under GO32 (see V2's distribution for an example). 
We changed the alignment in V2 to be on 512 byte boundaries, and the extra
"garbage" disappears.

- Raw text -


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