artiq/artiq/firmware/runtime/runtime.ld

81 lines
1.4 KiB
Plaintext
Raw Normal View History

INCLUDE generated/output_format.ld
INCLUDE generated/regions.ld
ENTRY(_reset_handler)
/* Assume ORIGIN(main_ram) = 0x40000000. Unfortunately,
* ld does not allow this expression here.
*/
MEMORY {
2016-10-07 02:05:38 +08:00
runtime (RWX) : ORIGIN = 0x40000000, LENGTH = 0x400000 /* 4M */
}
SECTIONS
{
.vectors :
{
*(.vectors)
} > runtime
2016-10-07 02:05:38 +08:00
.text :
{
*(.text .text.*)
2016-10-07 02:05:38 +08:00
} > runtime
.eh_frame :
{
__eh_frame_start = .;
KEEP(*(.eh_frame))
__eh_frame_end = .;
} > runtime
.eh_frame_hdr :
{
KEEP(*(.eh_frame_hdr))
} > runtime
__eh_frame_hdr_start = SIZEOF(.eh_frame_hdr) > 0 ? ADDR(.eh_frame_hdr) : 0;
__eh_frame_hdr_end = SIZEOF(.eh_frame_hdr) > 0 ? . : 0;
2016-10-07 02:05:38 +08:00
/* https://sourceware.org/bugzilla/show_bug.cgi?id=20475 */
2017-01-19 07:09:49 +08:00
.got :
{
2016-10-07 02:05:38 +08:00
_GLOBAL_OFFSET_TABLE_ = .;
*(.got)
} > runtime
2017-01-19 07:09:49 +08:00
.got.plt :
{
2016-10-07 02:05:38 +08:00
*(.got.plt)
} > runtime
2016-08-30 19:20:04 +08:00
2016-10-07 02:05:38 +08:00
.rodata :
{
*(.rodata .rodata.*)
2016-10-07 02:05:38 +08:00
} > runtime
2016-08-30 19:20:04 +08:00
2016-10-07 02:05:38 +08:00
.data :
{
*(.data .data.*)
2016-10-07 02:05:38 +08:00
} > runtime
.bss ALIGN(4) :
2016-10-07 02:05:38 +08:00
{
_fbss = .;
*(.bss .bss.*)
2016-10-07 02:05:38 +08:00
_ebss = .;
} > runtime
.stack ALIGN(0x1000) :
2016-10-07 02:05:38 +08:00
{
. += 0x4000;
_fstack = . - 4;
} > runtime
2016-10-07 02:05:38 +08:00
.heap :
{
_fheap = .;
. = ORIGIN(runtime) + LENGTH(runtime);
2016-10-07 02:05:38 +08:00
_eheap = .;
} > runtime
}