Subject: Re: kern/21844: netwinder kernal cannot be linked because link_set_* sections overlap with .data
To: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: tech-toolchain
Date: 06/11/2003 14:16:49
On Wednesday, June 11, 2003, at 02:12  PM, Valeriy E. Ushakov wrote:

> Should it?  My readind of ld(1) docs is that the "orphaned" sections
> are transferred from input to output as-is.

I guess the ld docs are wrong.  It was clear to me when investigating 
(and fixing) these failures on evbarm that not very many people had 
actually used orphan sections with explicit LMAs (i.e. AT statements in 
the script).

> Oh, that helps.    Is that a correct change:
>
>    . = ALIGN(0x8000);
>    .data    :
> -  AT ((LOADADDR(.text) + SIZEOF(.text) + (0x8000 - 1)) & ~(0x8000 - 
> 1))
> +  AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))

Yah, that looks right.

         -- Jason R. Thorpe <thorpej@wasabisystems.com>