Subject: Re: ELF ld bug or do I misunderstand the concept?
To: Ross Harvey <ross@teraflop.com>
From: Ignatios Souvatzis <is@jocelyn.rhein.de>
List: tech-toolchain
Date: 09/08/1998 14:02:48
On Mon, Sep 07, 1998 at 03:03:18PM -0700, Ross Harvey wrote:

> Are you objecting to the filesz==082c or to the memesz==92c? I also will
> guess that you really meant to say 82c-92b => 830-92f.
> 
> If the former, that looks fine to me. Remember that the bss sections don't
> actually exist in the image file. The linker just assumes that the kernel
> or run-time loader will set them up when the image is loaded...these days
> with virtual zfod pages. So bss origin adjustment wouldn't actually affect
> the origin or sizes of the text and data sections of the disk file
> 
> If the later, well, it's hard to imagine what a summary field really is
> good for, and it _does_ still accurately reflect the sum total of the sizes.
> The size would only change if the sections were contiguous. Since the
> sections are loaded separately anyway...

Addition to my other reply: 

if I ld without -N, the memory sizes are correct, that is, the end of the
(seperately created, in this case) 2nd program header region is at F0040930,
corresponding to the section header and the symbol table information.

	-is