artiq/artiq/firmware/bootloader/bootloader.ld
whitequark 2648b1b7a1 firmware: migrate to Rust 1.28.0.
This also updates / is a prerequisite for updating smoltcp.

Rationale for changes made:
  * compiler_builtins is now shipped in the rust prefix.
  * rustc's libpanic_unwind no longer works for us because it
    has a hard dependency on Box (and it's a horrible hack);
    fortunately, we only ever needed a personality function
    from it.
  * panic and oom handlers are now set in a completely different
    way.
  * allocators are quite different (and finally stable).
  * NLL caused internal compiler errors in runtime, so code using
    NLL was rewritten to not rely on it and it was turned off.
2018-08-12 19:17:45 +00:00

54 lines
953 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) - 0x800;
. = ORIGIN(sram) + LENGTH(sram) - 4;
_fstack = .;
} > sram
}