56 lines
1.1 KiB
Plaintext
56 lines
1.1 KiB
Plaintext
/* $NetBSD: kern.ldscript,v 1.4 2007/10/18 15:28:33 yamt Exp $ */
|
|
|
|
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
|
|
"elf64-x86-64")
|
|
OUTPUT_ARCH(i386:x86-64)
|
|
ENTRY(_start)
|
|
SECTIONS
|
|
{
|
|
/* Read-only sections, merged into text segment: */
|
|
.text :
|
|
AT (ADDR(.text))
|
|
{
|
|
*(.text)
|
|
*(.text.*)
|
|
*(.stub)
|
|
} =0
|
|
_etext = . ;
|
|
PROVIDE (etext = .) ;
|
|
|
|
.rodata :
|
|
AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text)))
|
|
{
|
|
*(.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(0x100000) + (. & (0x100000 - 1));
|
|
__data_start = . ;
|
|
.data :
|
|
AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
|
|
{
|
|
*(.data)
|
|
*(.data.*)
|
|
}
|
|
_edata = . ;
|
|
PROVIDE (edata = .) ;
|
|
__bss_start = . ;
|
|
.bss :
|
|
AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text)))
|
|
{
|
|
*(.bss)
|
|
*(.bss.*)
|
|
*(COMMON)
|
|
. = ALIGN(64 / 8);
|
|
}
|
|
. = ALIGN(64 / 8);
|
|
_end = . ;
|
|
PROVIDE (end = .) ;
|
|
.note.netbsd.ident :
|
|
{
|
|
KEEP(*(.note.netbsd.ident));
|
|
}
|
|
}
|