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;
|
2019-10-22 02:27:18 +00:00
|
|
|
|
|
|
|
.text : {
|
|
|
|
*(.text .text.*)
|
2019-05-31 13:45:59 +00:00
|
|
|
. = ALIGN(0x1000);
|
2019-10-22 02:27:18 +00:00
|
|
|
_trampoline = .;
|
2019-07-26 08:53:46 +00:00
|
|
|
*(trampsec)
|
2019-10-22 02:27:18 +00:00
|
|
|
. = 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
|
|
|
|
2019-10-22 02:27:18 +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 : {
|
2019-10-22 02:27:18 +00:00
|
|
|
. = 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-10-22 02:27:18 +00:00
|
|
|
|
2019-09-08 10:51:58 +00:00
|
|
|
.bss : {
|
2019-10-22 02:27:18 +00:00
|
|
|
. = ALIGN(16);
|
|
|
|
*(.sbss .sbss.*) /* do not need to distinguish this from .bss */
|
|
|
|
. = ALIGN(16);
|
|
|
|
*(.bss .bss.*)
|
2019-05-31 13:45:59 +00:00
|
|
|
}
|
2019-10-22 02:27:18 +00:00
|
|
|
|
|
|
|
PROVIDE(end = .);
|
2011-08-07 16:30:34 +00:00
|
|
|
}
|