2
0
mirror of https://github.com/m-labs/artiq.git synced 2025-01-24 17:38:13 +08:00
artiq/artiq/firmware/ksupport/ksupport.ld
David Nadlinger 8acfa82586 ksupport: Remove unused sections from linker script [nfc]
We no longer build ksupport.ld in a position-independent fashion, and
the reference to the ld.bfd _GLOBAL_OFFSET_TABLE issue was just a
distraction
2023-08-07 10:10:38 +00:00

76 lines
1.3 KiB
Plaintext

INCLUDE generated/output_format.ld
INCLUDE generated/regions.ld
ENTRY(_reset_handler)
/* First 64M of main memory are reserved for runtime
* code/data/heap, then comes kernel memory.
* Next 16M of main memory are reserved for
* the background RPC queue.
* First 384K of kernel memory are for support code.
* Support code is loaded at ORIGIN-0x80 so that ELF headers
* are also loaded.
*/
MEMORY {
ksupport (RWX) : ORIGIN = 0x45000000, LENGTH = 0x60000
}
/* Kernel stack is at the end of main RAM. */
_fstack = ORIGIN(main_ram) + LENGTH(main_ram) - 16;
/* Force ld to make the ELF header as loadable. */
PHDRS
{
text PT_LOAD FILEHDR PHDRS;
eh_frame PT_GNU_EH_FRAME;
}
SECTIONS
{
.vectors : {
*(.vectors)
} :text
.text :
{
*(.text .text.*)
} :text
.rodata :
{
*(.rodata .rodata.*)
} > ksupport
.eh_frame :
{
KEEP(*(.eh_frame))
} > ksupport :text
.eh_frame_hdr :
{
KEEP(*(.eh_frame_hdr))
} > ksupport :text :eh_frame
.gcc_except_table :
{
*(.gcc_except_table)
} > ksupport
.data :
{
*(.data .data.*)
}
.bss (NOLOAD) : ALIGN(4)
{
_fbss = .;
*(.sbss .sbss.* .bss .bss.*);
. = ALIGN(4);
_ebss = .;
}
/DISCARD/ :
{
*(.debug*)
}
}