85 lines
1.6 KiB
Plaintext
85 lines
1.6 KiB
Plaintext
/* $NetBSD: ldscript.elf,v 1.6 2015/08/23 08:57:25 uebayasi Exp $ */
|
|
|
|
ENTRY(KERNEL_BASE_phys)
|
|
SECTIONS
|
|
{
|
|
/* Kernel start: */
|
|
.start :
|
|
{
|
|
*(.start)
|
|
}
|
|
|
|
/* Read-only sections, merged into text segment: */
|
|
.text :
|
|
{
|
|
*(.text)
|
|
*(.text.*)
|
|
*(.stub)
|
|
*(.glue_7t) *(.glue_7)
|
|
*(.rodata) *(.rodata.*)
|
|
}
|
|
PROVIDE (__etext = .);
|
|
PROVIDE (_etext = .);
|
|
PROVIDE (etext = .);
|
|
/* Adjust the address for the data segment to start on the next page
|
|
boundary. */
|
|
. = ALIGN(0x8000);
|
|
.data :
|
|
{
|
|
__data_start = . ;
|
|
*(.data)
|
|
*(.data.*)
|
|
}
|
|
.sdata :
|
|
{
|
|
*(.sdata)
|
|
*(.sdata.*)
|
|
}
|
|
_edata = .;
|
|
PROVIDE (edata = .);
|
|
__bss_start = .;
|
|
__bss_start__ = .;
|
|
.sbss :
|
|
{
|
|
PROVIDE (__sbss_start = .);
|
|
PROVIDE (___sbss_start = .);
|
|
*(.dynsbss)
|
|
*(.sbss)
|
|
*(.sbss.*)
|
|
*(.scommon)
|
|
PROVIDE (__sbss_end = .);
|
|
PROVIDE (___sbss_end = .);
|
|
}
|
|
.bss :
|
|
{
|
|
*(.dynbss)
|
|
*(.bss)
|
|
*(.bss.*)
|
|
*(COMMON)
|
|
/* Align here to ensure that the .bss section occupies space up to
|
|
_end. Align after .bss to ensure correct alignment even if the
|
|
.bss section disappears because there are no input sections. */
|
|
. = ALIGN(32 / 8);
|
|
}
|
|
. = ALIGN(32 / 8);
|
|
_end = .;
|
|
_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
|
|
PROVIDE (end = .);
|
|
}
|
|
SECTIONS
|
|
{
|
|
KERNEL_BASE_phys = 0xF0000000;
|
|
KERNEL_BASE_virt = 0xF0000000;
|
|
|
|
.start (KERNEL_BASE_phys) :
|
|
{
|
|
*(.start)
|
|
} =0
|
|
|
|
.text (KERNEL_BASE_virt + SIZEOF(.start)) :
|
|
AT (LOADADDR(.start) + SIZEOF(.start))
|
|
{
|
|
*(.text)
|
|
} =0
|
|
}
|