mini-rv32ima/baremetal/flatfile.lds

84 lines
1.2 KiB
Text
Raw Permalink Normal View History

2022-11-14 02:45:05 -05:00
__heap_size = 0x1000;
__stack_size = 0x1000;
2022-10-27 18:14:37 -07:00
ENTRY(_start)
2022-10-27 18:14:37 -07:00
SECTIONS
{
. = 0x80000000;
/*
2022-10-27 18:14:37 -07:00
.header : ALIGN( 16 )
{
2022-10-28 03:46:33 -04:00
LONG( 0 )
LONG( 0 )
2022-10-27 18:14:37 -07:00
}
*/
2022-10-27 18:14:37 -07:00
.text : ALIGN(16) {
__TEXT_BEGIN__ = .;
*(.initial_jump)
*(.entry.text)
*(.init.literal)
*(.init)
2022-11-14 02:45:05 -05:00
*(.text)
2022-10-27 18:14:37 -07:00
*(.literal .text .literal.* .text.* .stub)
*(.out_jump.literal.*)
*(.out_jump.*)
__TEXT_END__ = .;
2022-11-14 02:45:05 -05:00
}
/* If we're on a newer compiler */
/DISCARD/ :
{
*(.interp)
*(.dynsym)
*(.dynstr)
*(.header)
} : phdr
2022-10-27 18:14:37 -07:00
.data : ALIGN(16) {
__DATA_BEGIN__ = .;
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.dynsbss)
*(.gnu.linkonce.sb.*)
*(.scommon)
2022-11-14 02:45:05 -05:00
*(.gnu.linkonce.sb2.*)
*(.sbss)
*(.sbss.*)
2022-10-27 18:14:37 -07:00
*(.sbss2)
*(.sbss2.*)
*(.dynbss)
*(.data)
*(.data.*)
2022-11-14 02:45:05 -05:00
*(.got)
*(.got.*)
2022-10-27 18:14:37 -07:00
__DATA_END__ = .;
}
.bss : ALIGN( 16 ) {
__BSS_BEGIN__ = .;
*(.bss) /* Tricky: BSS needs to be allocated but not sent. GCC Will not populate these for calculating data size */
*(.bss.*)
__BSS_END__ = .;
}
.heap : ALIGN( 16 ) {
_sheap = .;
. = . + __heap_size;
_eheap = .;
}
.stack : ALIGN( 16 ) {
_estack = .;
. = . + __stack_size;
_sstack = .;
}
PROVIDE( SYSCON = 0x11100000 );
PROVIDE( TIMERL = 0x1100bff8 );
PROVIDE( TIMERH = 0x1100bffc );
2022-10-27 18:14:37 -07:00
}
2022-10-28 03:46:33 -04:00