forked from M-Labs/artiq
Sebastien Bourdeauducq
5362f92b39
* The value varies greatly whether netboot is enabled or not. * There is no simple solution to detect has_ethmac in the linker script and set the value accordingly. * The space check is an imperfect solution that will be superseded by stack pointer limits. * Left commented out so we can re-enable it manually during development if stack corruption is suspected.
54 lines
959 B
Plaintext
54 lines
959 B
Plaintext
INCLUDE generated/output_format.ld
|
|
INCLUDE generated/regions.ld
|
|
ENTRY(_reset_handler)
|
|
|
|
SECTIONS
|
|
{
|
|
.vectors :
|
|
{
|
|
_begin = .;
|
|
*(.vectors)
|
|
} > rom
|
|
|
|
.text :
|
|
{
|
|
*(.text .text.*)
|
|
} > rom
|
|
|
|
/*
|
|
* The compiler_builtins crate includes some GOTPC relocations, which require a GOT symbol,
|
|
* but don't actually need a GOT. This really ought to be fixed on rustc level, but I'm afraid
|
|
* it will add further complications to our build system that aren't pulling their weight.
|
|
*/
|
|
_GLOBAL_OFFSET_TABLE_ = .;
|
|
|
|
.rodata :
|
|
{
|
|
*(.rodata.*)
|
|
. = ALIGN(4);
|
|
_end = .;
|
|
} > rom
|
|
|
|
.crc ALIGN(4) :
|
|
{
|
|
_crc = .;
|
|
. += 4;
|
|
}
|
|
|
|
.bss :
|
|
{
|
|
_fbss = .;
|
|
*(.bss .bss.*)
|
|
. = ALIGN(4);
|
|
_ebss = .;
|
|
} > sram
|
|
|
|
.stack :
|
|
{
|
|
/* Ensure we have a certain amount of space available for stack. */
|
|
/*. = ORIGIN(sram) + LENGTH(sram) - 0x1a00; */
|
|
. = ORIGIN(sram) + LENGTH(sram) - 4;
|
|
_fstack = .;
|
|
} > sram
|
|
}
|