2019-04-17 18:40:26 +02:00
|
|
|
ENTRY(_start)
|
|
|
|
|
2019-04-19 22:10:27 +02:00
|
|
|
KERNEL_ADDR_OFFSET = 0xC0000000;
|
2019-05-23 18:50:37 +02:00
|
|
|
KERNEL_VADDR_START = 0xC0100000;
|
2019-04-19 22:10:27 +02:00
|
|
|
|
2019-04-17 18:40:26 +02:00
|
|
|
SECTIONS {
|
|
|
|
. = 1M;
|
2019-04-19 22:10:27 +02:00
|
|
|
KERNEL_PHYSADDR_START = .;
|
|
|
|
|
|
|
|
.rodata.boot : {
|
|
|
|
*(.rodata.boot)
|
|
|
|
}
|
|
|
|
|
|
|
|
.text.boot : {
|
|
|
|
*(.text.boot)
|
|
|
|
}
|
2019-04-17 18:40:26 +02:00
|
|
|
|
2019-05-23 18:50:37 +02:00
|
|
|
. += KERNEL_ADDR_OFFSET;
|
2019-04-19 22:10:27 +02:00
|
|
|
|
|
|
|
.text ALIGN(4K) : AT (ADDR(.text) - KERNEL_ADDR_OFFSET) {
|
2019-04-17 18:40:26 +02:00
|
|
|
*(.text)
|
|
|
|
}
|
|
|
|
|
2019-04-19 22:10:27 +02:00
|
|
|
.rodata ALIGN(4K) : AT (ADDR(.rodata) - KERNEL_ADDR_OFFSET) {
|
2019-04-17 18:40:26 +02:00
|
|
|
*(.rodata)
|
|
|
|
}
|
|
|
|
|
2019-04-19 22:10:27 +02:00
|
|
|
.data ALIGN(4K) : AT (ADDR(.data) - KERNEL_ADDR_OFFSET) {
|
2019-04-17 18:40:26 +02:00
|
|
|
*(.data)
|
|
|
|
}
|
|
|
|
|
2019-04-19 22:10:27 +02:00
|
|
|
.bss ALIGN(4K) : AT (ADDR(.bss) - KERNEL_ADDR_OFFSET) {
|
2019-04-17 18:40:26 +02:00
|
|
|
*(COMMON)
|
|
|
|
*(.bss)
|
|
|
|
}
|
2019-04-19 22:10:27 +02:00
|
|
|
|
|
|
|
.bss.stack ALIGN(4K) : AT (ADDR(.bss.stack) - KERNEL_ADDR_OFFSET) {
|
|
|
|
*(.bss.stack)
|
|
|
|
KERNEL_STACK_END = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
KERNEL_VADDR_END = .;
|
|
|
|
KERNEL_PHYSADDR_END = . - KERNEL_ADDR_OFFSET;
|
|
|
|
|
|
|
|
}
|