Avoid using SIZEOF to compute output section LMAs, it doesn't mix well

with orphaned sections like link_set_*.  Per discussion with Jason
Thorpe <thorpej@netbsd> on tech-toolchain.

Addresses kern/21844.
This commit is contained in:
uwe 2003-06-11 21:49:40 +00:00
parent 4812bbf71f
commit 8580b490b0
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern.ldscript,v 1.2 2002/04/11 21:48:46 thorpej Exp $ */
/* $NetBSD: kern.ldscript,v 1.3 2003/06/11 21:49:40 uwe Exp $ */
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
"elf32-littlearm")
@ -32,14 +32,14 @@ SECTIONS
boundary. */
. = ALIGN(0x8000);
.data :
AT ((LOADADDR(.text) + SIZEOF(.text) + (0x8000 - 1)) & ~(0x8000 - 1))
AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
{
__data_start = . ;
*(.data)
*(.data.*)
}
.sdata :
AT (LOADADDR(.data) + SIZEOF(.data))
.sdata :
AT (LOADADDR(.data) + (ADDR(.sdata) - ADDR(.data)))
{
*(.sdata)
*(.sdata.*)