98 lines
2.9 KiB
Plaintext
98 lines
2.9 KiB
Plaintext
/* $NetBSD: kern.ldscript,v 1.7 2011/03/05 15:19:44 matt Exp $ */
|
|
|
|
/* ldscript for NetBSD/mips kernels and LKMs */
|
|
OUTPUT_ARCH(mips)
|
|
ENTRY(_start)
|
|
SEARCH_DIR(/lib);
|
|
/* Do we need any of these?
|
|
__DYNAMIC = 0; */
|
|
_DYNAMIC_LINK = 0;
|
|
SECTIONS
|
|
{
|
|
/* Read-only sections, merged into text segment. Assumes the
|
|
kernel Makefile sets the start address via -Ttext. */
|
|
.text :
|
|
{
|
|
_ftext = . ;
|
|
*(.text)
|
|
__stub_start = . ;
|
|
*(.stub*)
|
|
__stub_end = . ;
|
|
*(.gnu.warning)
|
|
} =0
|
|
_etext = .;
|
|
PROVIDE (etext = .);
|
|
.rodata : { *(.rodata) *(.rodata.*) }
|
|
.reginfo : { *(.reginfo) }
|
|
/* . = . + 0x1000; */
|
|
.data :
|
|
{
|
|
_fdata = . ;
|
|
*(.data)
|
|
CONSTRUCTORS
|
|
. = ALIGN(32); /* COHERENCY_UNIT */
|
|
*(.data.cacheline_aligned)
|
|
. = ALIGN(32); /* COHERENCY_UNIT */
|
|
*(.data.read_mostly)
|
|
. = ALIGN(32); /* COHERENCY_UNIT */
|
|
}
|
|
_gp = ALIGN(16) + 0x7ff0;
|
|
.lit8 : { *(.lit8) }
|
|
.lit4 : { *(.lit4) }
|
|
.sdata : { *(.sdata) }
|
|
_edata = .;
|
|
PROVIDE (edata = .);
|
|
__bss_start = .;
|
|
_fbss = .;
|
|
.sbss : { *(.sbss) *(.scommon) }
|
|
.bss :
|
|
{
|
|
*(.bss)
|
|
*(COMMON)
|
|
}
|
|
_end = . ;
|
|
PROVIDE (end = .);
|
|
/* These are needed for ELF backends which have not yet been
|
|
converted to the new style linker. */
|
|
.stab 0 : { *(.stab) }
|
|
.stabstr 0 : { *(.stabstr) }
|
|
/* DWARF debug sections.
|
|
Symbols in the .debug DWARF section are relative to the beginning of the
|
|
section so we begin .debug at 0. It's not clear yet what needs to happen
|
|
for the others. */
|
|
.debug 0 : { *(.debug) }
|
|
/* DWARF 1 */
|
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
|
/* DWARF 1.1 and DWARF 2 */
|
|
.debug_aranges 0 : { *(.debug_aranges) }
|
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
/* DWARF 2 */
|
|
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
.debug_line 0 : { *(.debug_line) }
|
|
.debug_frame 0 : { *(.debug_frame) }
|
|
.debug_str 0 : { *(.debug_str) }
|
|
.debug_loc 0 : { *(.debug_loc) }
|
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
|
/* SGI/MIPS DWARF 2 extensions */
|
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
|
.debug_typenames 0 : { *(.debug_typenames) }
|
|
.debug_varnames 0 : { *(.debug_varnames) }
|
|
/* DWARF3 */
|
|
.debug_pubtypes 0 : { *(.debug_pubtypes) }
|
|
.debug_ranges 0 : { *(.debug_ranges) }
|
|
/* for GDB */
|
|
.mdebug.abi32 : { KEEP(*(.mdebug.abi32)) }
|
|
.mdebug.abiN32 : { KEEP(*(.mdebug.abiN32)) }
|
|
.mdebug.abi64 : { KEEP(*(.mdebug.abi64)) }
|
|
.mdebug.abiO64 : { KEEP(*(.mdebug.abiO64)) }
|
|
.mdebug.eabi32 : { KEEP(*(.mdebug.eabi32)) }
|
|
.mdebug.eabi64 : { KEEP(*(.mdebug.eabi64)) }
|
|
/* These must appear regardless of . */
|
|
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
|
|
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
|
|
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }
|
|
}
|