xv6-65oo2/kernel/kernel.ld

45 lines
864 B
Plaintext
Raw Permalink Normal View History

2019-05-31 13:45:59 +00:00
OUTPUT_ARCH( "riscv" )
ENTRY( _entry )
2011-08-07 16:30:34 +00:00
SECTIONS
{
2019-05-31 13:45:59 +00:00
/*
* ensure that entry.S / _entry is at 0x80000000,
* where qemu's -kernel jumps.
*/
. = 0x80000000;
.text : {
*(.text .text.*)
2019-05-31 13:45:59 +00:00
. = ALIGN(0x1000);
_trampoline = .;
2019-07-26 08:53:46 +00:00
*(trampsec)
. = ALIGN(0x1000);
ASSERT(. - _trampoline == 0x1000, "error: trampoline larger than one page");
PROVIDE(etext = .);
2019-05-31 13:45:59 +00:00
}
2011-08-07 16:30:34 +00:00
.rodata : {
. = ALIGN(16);
*(.srodata .srodata.*) /* do not need to distinguish this from .rodata */
. = ALIGN(16);
*(.rodata .rodata.*)
}
2011-08-07 16:30:34 +00:00
2019-05-31 13:45:59 +00:00
.data : {
. = ALIGN(16);
*(.sdata .sdata.*) /* do not need to distinguish this from .data */
. = ALIGN(16);
*(.data .data.*)
2019-05-31 13:45:59 +00:00
}
2019-09-08 10:51:58 +00:00
.bss : {
. = ALIGN(16);
*(.sbss .sbss.*) /* do not need to distinguish this from .bss */
. = ALIGN(16);
*(.bss .bss.*)
2019-05-31 13:45:59 +00:00
}
PROVIDE(end = .);
2011-08-07 16:30:34 +00:00
}