2021-07-18 14:47:32 +02:00
|
|
|
ENTRY(init)
|
2018-10-16 11:01:38 +02:00
|
|
|
|
2021-07-18 03:35:26 +02:00
|
|
|
KERNEL_VIRTUAL_BASE = 0x2000000000;
|
2021-03-04 18:18:43 +01:00
|
|
|
|
2021-06-18 19:04:39 +02:00
|
|
|
PHDRS
|
|
|
|
{
|
2021-07-19 18:52:01 +02:00
|
|
|
super_pages PT_LOAD ;
|
2021-06-18 19:04:39 +02:00
|
|
|
text PT_LOAD ;
|
|
|
|
data PT_LOAD ;
|
|
|
|
bss PT_LOAD ;
|
2021-07-14 21:04:18 +02:00
|
|
|
ksyms PT_LOAD ;
|
2021-06-18 19:04:39 +02:00
|
|
|
}
|
|
|
|
|
2018-10-16 11:01:38 +02:00
|
|
|
SECTIONS
|
|
|
|
{
|
2021-07-18 03:35:26 +02:00
|
|
|
. = KERNEL_VIRTUAL_BASE + 0x00200000;
|
2018-10-16 11:01:38 +02:00
|
|
|
|
2020-01-17 19:59:20 +01:00
|
|
|
start_of_kernel_image = .;
|
|
|
|
|
2021-07-19 18:52:01 +02:00
|
|
|
.super_pages ALIGN(4K) (NOLOAD) : AT (ADDR(.super_pages) - KERNEL_VIRTUAL_BASE)
|
2021-07-19 09:29:07 +02:00
|
|
|
{
|
|
|
|
*(.super_pages)
|
2021-07-19 18:52:01 +02:00
|
|
|
} :super_pages
|
2021-07-19 09:29:07 +02:00
|
|
|
|
2021-06-17 19:27:05 +02:00
|
|
|
.text ALIGN(4K) : AT (ADDR(.text) - KERNEL_VIRTUAL_BASE)
|
|
|
|
{
|
2020-01-06 13:53:30 +01:00
|
|
|
start_of_kernel_text = .;
|
2020-12-19 18:48:56 -07:00
|
|
|
|
|
|
|
start_of_safemem_text = .;
|
2021-02-09 22:49:02 +00:00
|
|
|
KEEP(*(.text.safemem))
|
2020-12-19 18:48:56 -07:00
|
|
|
end_of_safemem_text = .;
|
|
|
|
start_of_safemem_atomic_text = .;
|
2021-02-09 22:49:02 +00:00
|
|
|
KEEP(*(.text.safemem.atomic))
|
2020-12-19 18:48:56 -07:00
|
|
|
end_of_safemem_atomic_text = .;
|
|
|
|
|
2021-02-09 22:49:02 +00:00
|
|
|
*(.text*)
|
2021-06-18 19:04:39 +02:00
|
|
|
} :text
|
2021-02-19 18:21:54 +01:00
|
|
|
|
2021-03-04 18:18:43 +01:00
|
|
|
.unmap_after_init ALIGN(4K) : AT (ADDR(.unmap_after_init) - KERNEL_VIRTUAL_BASE)
|
2021-02-19 18:21:54 +01:00
|
|
|
{
|
|
|
|
start_of_unmap_after_init = .;
|
|
|
|
*(.unmap_after_init*);
|
|
|
|
end_of_unmap_after_init = .;
|
|
|
|
|
2020-01-06 13:53:30 +01:00
|
|
|
end_of_kernel_text = .;
|
2021-06-18 19:04:39 +02:00
|
|
|
} :text
|
2018-10-16 11:01:38 +02:00
|
|
|
|
2021-03-04 18:18:43 +01:00
|
|
|
.rodata ALIGN(4K) : AT (ADDR(.rodata) - KERNEL_VIRTUAL_BASE)
|
2020-01-16 09:46:09 +01:00
|
|
|
{
|
2020-08-10 09:44:35 -06:00
|
|
|
start_heap_ctors = .;
|
|
|
|
*libkernel_heap.a:*(.ctors)
|
|
|
|
end_heap_ctors = .;
|
|
|
|
|
2020-01-16 09:46:09 +01:00
|
|
|
start_ctors = .;
|
|
|
|
*(.ctors)
|
|
|
|
end_ctors = .;
|
2019-10-31 12:01:13 -06:00
|
|
|
|
2021-02-09 22:49:02 +00:00
|
|
|
*(.rodata*)
|
2021-06-18 19:04:39 +02:00
|
|
|
} :data
|
2018-10-16 11:01:38 +02:00
|
|
|
|
2021-03-04 18:18:43 +01:00
|
|
|
.data ALIGN(4K) : AT (ADDR(.data) - KERNEL_VIRTUAL_BASE)
|
2020-01-16 09:46:09 +01:00
|
|
|
{
|
2020-01-06 13:53:30 +01:00
|
|
|
start_of_kernel_data = .;
|
2021-02-09 22:49:02 +00:00
|
|
|
*(.data*)
|
2020-01-06 13:53:30 +01:00
|
|
|
end_of_kernel_data = .;
|
2021-06-18 19:04:39 +02:00
|
|
|
} :data
|
2018-10-16 11:01:38 +02:00
|
|
|
|
2021-03-04 18:18:43 +01:00
|
|
|
.ro_after_init ALIGN(4K) (NOLOAD) : AT(ADDR(.ro_after_init) - KERNEL_VIRTUAL_BASE)
|
2021-02-14 17:35:07 +01:00
|
|
|
{
|
|
|
|
start_of_ro_after_init = .;
|
|
|
|
*(.ro_after_init);
|
|
|
|
end_of_ro_after_init = .;
|
2021-06-18 19:04:39 +02:00
|
|
|
} :data
|
2021-02-14 17:35:07 +01:00
|
|
|
|
2021-03-04 18:18:43 +01:00
|
|
|
.bss ALIGN(4K) (NOLOAD) : AT (ADDR(.bss) - KERNEL_VIRTUAL_BASE)
|
2020-01-16 09:46:09 +01:00
|
|
|
{
|
2020-01-06 13:53:30 +01:00
|
|
|
start_of_kernel_bss = .;
|
2020-01-17 19:59:20 +01:00
|
|
|
*(page_tables)
|
2020-01-16 09:46:09 +01:00
|
|
|
*(COMMON)
|
|
|
|
*(.bss)
|
2020-01-06 13:53:30 +01:00
|
|
|
end_of_kernel_bss = .;
|
2021-01-20 17:49:55 +01:00
|
|
|
|
|
|
|
. = ALIGN(4K);
|
|
|
|
*(.heap)
|
2021-06-18 19:04:39 +02:00
|
|
|
} :bss
|
2020-01-17 19:59:20 +01:00
|
|
|
|
2021-07-14 21:04:18 +02:00
|
|
|
|
|
|
|
.ksyms ALIGN(4K) : AT (ADDR(.ksyms) - KERNEL_VIRTUAL_BASE)
|
|
|
|
{
|
2021-07-16 09:50:34 +02:00
|
|
|
start_of_kernel_ksyms = .;
|
2021-07-14 21:04:18 +02:00
|
|
|
*(.kernel_symbols)
|
2021-07-16 09:50:34 +02:00
|
|
|
end_of_kernel_ksyms = .;
|
2021-07-14 21:04:18 +02:00
|
|
|
} :ksyms
|
2021-07-16 09:50:34 +02:00
|
|
|
|
|
|
|
end_of_kernel_image = .;
|
2018-10-16 11:01:38 +02:00
|
|
|
}
|