Subject: Re: sparc ELF kernels with a miniroot are broken.
To: Gandhi woulda smacked you <greywolf@starwolf.com>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-sparc
Date: 06/24/1999 10:14:42
On Wed, 23 Jun 1999 22:52:23 -0700 (PDT)
Gandhi woulda smacked you <greywolf@starwolf.com> wrote:
> # Sections:
> # Idx Name Size VMA LMA File off Algn
> # 0 .text 00120468 f0004000 f0004000 00000074 2**2
> # CONTENTS, ALLOC, LOAD, READONLY, CODE
> # 1 .rodata 000199cd f0124468 f0124468 001204dc 2**3
> # CONTENTS, ALLOC, LOAD, READONLY, DATA
> # 2 .data 0001547c f014de38 f014de38 00139eb0 2**3
> # CONTENTS, ALLOC, LOAD, DATA
> # 3 .bss 00023d54 f0163300 f0163300 0014f400 2**8
> # ALLOC
> # 4 .comment 00004f10 00000000 00000000 0014f400 2**0
> # CONTENTS, READONLY
>
> Folks, I think we have a real winner here. To my green-horned point
> of view (WRT linker/compiler issues), it looks as though the .comment
> section points to exactly the same place as the .bss does. I'm
> guessing that the READONLY attributes takes precedence on that chunk
> of code for at least the first 0x4f10 bytes of code.
>
> Am I mistaken, or is this an overwrite (i.e. shouldn't file off for
> .comment really be 0x14f400 + 0x23d54, or 0x173154)?
No. Neither the .bss or .comment sections are actually loaded from the
file (per the program headers).
-- Jason R. Thorpe <thorpej@nas.nasa.gov>