ENTRY(_start); /* nb: when proving we will rebuild the memory model based on the first pass' usages, so there is no cost for a "suboptimal" layout here */ SECTIONS { __memory_top = 0x80400000; . = 0x1000; .text : ALIGN(4) { KEEP(*(.init)); . = ALIGN(4); KEEP(*(.init.rust)); *(.text .text.*); } . = ALIGN(8); .data : ALIGN(4) { /* Must be called __global_pointer$ for linker relaxations to work. */ __global_pointer$ = . + 0x800; *(.srodata .srodata.*); *(.rodata .rodata.*); *(.sdata .sdata.* .sdata2 .sdata2.*); *(.data .data.*); /* this is used by the global allocator (see:src/lib.rs) */ . = ALIGN(4); _heap = .; LONG(_ebss); } .bss (NOLOAD) : ALIGN(4) { *(.sbss .sbss.* .bss .bss.*); . = ALIGN(4); _ebss = .; _end = .; } /DISCARD/ : { *(.comment*) *(.debug*) } /* Stack unwinding is not supported, but we will keep these for now */ .eh_frame (INFO) : { KEEP(*(.eh_frame)) } .eh_frame_hdr (INFO) : { *(.eh_frame_hdr) } } ASSERT(. < __memory_top, "Program is too large for the VM memory.");