NetBSD/sys/arch/i386/conf/kern.ldscript
2015-11-28 18:08:40 +00:00

73 lines
1.0 KiB
Plaintext

/* $NetBSD: kern.ldscript,v 1.16 2015/11/28 18:08:40 maxv Exp $ */
#include "assym.h"
ENTRY(_start)
SECTIONS
{
/* Read-only sections, merged into text segment: */
.text :
{
*(.text)
*(.text.*)
*(.stub)
}
_etext = . ;
PROVIDE (etext = .) ;
.rodata :
{
*(.rodata)
*(.rodata.*)
}
/*
* Adjust the address for the data segment. We want to adjust up to
* the same address within the page on the next page up.
*/
. = ALIGN(0x1000) + (. & (0x1000 - 1));
__data_start = . ;
.data :
{
*(.data)
}
. = ALIGN(COHERENCY_UNIT);
.data.cacheline_aligned :
{
*(.data.cacheline_aligned)
}
. = ALIGN(COHERENCY_UNIT);
.data.read_mostly :
{
*(.data.read_mostly)
}
. = ALIGN(COHERENCY_UNIT);
_edata = . ;
PROVIDE (edata = .) ;
__bss_start = . ;
.bss :
{
*(.bss)
*(.bss.*)
*(COMMON)
. = ALIGN(32 / 8);
}
. = ALIGN(32 / 8);
_end = . ;
PROVIDE (end = .) ;
.note.netbsd.ident :
{
KEEP(*(.note.netbsd.ident));
}
}
SECTIONS
{
.text :
AT (ADDR(.text) & 0x0fffffff)
{
*(.text)
} = 0
}