15 PROVIDE(_ram = ORIGIN(memory_mem));
16 PROVIDE(_ram_end = _ram + LENGTH(memory_mem));
18 .text ALIGN((ORIGIN(maskrom_mem) + 0x0), 8) : AT(ALIGN((ORIGIN(maskrom_mem) + 0x0), 8)) {
21 *(.text.unlikely .text.unlikely.*)
22 *(.text .text.* .gnu.linkonce.t.*)
24 . += 0x40; /* to create a gap between .text and .data b/c ifetch can fetch ahead from .data */
27 .eh_frame ALIGN((ADDR(.text) + SIZEOF(.text)), 8) : AT(ALIGN((LOADADDR(.text) + SIZEOF(.text)), 8)) {
31 .rodata ALIGN((ADDR(.eh_frame) + SIZEOF(.eh_frame)), 8) : AT(ALIGN((LOADADDR(.eh_frame) + SIZEOF(.eh_frame)), 8)) ALIGN_WITH_INPUT {
32 *(.rodata .rodata.* .gnu.linkonce.r.*)
35 .srodata ALIGN((ADDR(.rodata) + SIZEOF(.rodata)), 8) : AT(ALIGN((LOADADDR(.rodata) + SIZEOF(.rodata)), 8)) ALIGN_WITH_INPUT {
43 .data ALIGN((ADDR(.srodata) + SIZEOF(.srodata)), 8) : AT(ALIGN((LOADADDR(.srodata) + SIZEOF(.srodata)), 8)) ALIGN_WITH_INPUT {
44 *(.data .data.* .gnu.linkonce.d.*)
45 *(.tohost) /* TODO: Support sections that aren't explicitly listed in this linker script */
48 .sdata ALIGN((ADDR(.data) + SIZEOF(.data)), 8) : AT(ALIGN((LOADADDR(.data) + SIZEOF(.data)), 8)) ALIGN_WITH_INPUT {
49 *(.sdata .sdata.* .gnu.linkonce.s.*)
52 PROVIDE(_data = ADDR(.rodata));
53 PROVIDE(_data_lma = LOADADDR(.rodata));
56 .bss ALIGN((ORIGIN(memory_mem) + 0x0), 8) : AT(ALIGN((ORIGIN(memory_mem) + 0x0), 8)) ALIGN(8) {
58 PROVIDE(__global_pointer$ = . + 0x7C0);
59 *(.sbss .sbss.* .gnu.linkonce.sb.*)
60 *(.bss .bss.* .gnu.linkonce.b.*)
68 * heap_stack_region_usable_end: (ORIGIN(memory_mem) + LENGTH(memory_mem))
69 * heap_stack_min_size: 4096
70 * heap_stack_max_size: 1048576
72 PROVIDE(_sp = ALIGN(MIN((ORIGIN(memory_mem) + LENGTH(memory_mem)), _ebss + 1048576) - 7, 8));
73 PROVIDE(_heap_end = _sp - 2048);
75 /* This section is a noop and is only used for the ASSERT */
77 ASSERT(_sp >= (_ebss + 4096), "Error: No room left for the heap and stack");