2020-09-30 01:31:42 +03:00
|
|
|
ENTRY(stivale_main)
|
2020-03-25 01:39:02 +03:00
|
|
|
|
2021-07-25 02:18:36 +03:00
|
|
|
PHDRS
|
|
|
|
{
|
|
|
|
null PT_NULL FLAGS(0) ; /* Null segment */
|
|
|
|
text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; /* Execute + Read */
|
|
|
|
rodata PT_LOAD FLAGS((1 << 2)) ; /* Read only */
|
|
|
|
data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; /* Write + Read */
|
2021-10-29 20:51:22 +03:00
|
|
|
dynamic PT_DYNAMIC FLAGS((1 << 1) | (1 << 2)) ; /* Dynamic segment needed for PIE */
|
2021-07-25 02:18:36 +03:00
|
|
|
}
|
|
|
|
|
2020-09-30 01:31:42 +03:00
|
|
|
SECTIONS
|
|
|
|
{
|
2021-10-29 02:15:11 +03:00
|
|
|
. = 0xffffffff80000000;
|
2022-03-18 01:46:48 +03:00
|
|
|
kernel_start = .;
|
2021-07-25 02:18:36 +03:00
|
|
|
|
|
|
|
.text : {
|
|
|
|
*(.text*)
|
|
|
|
} :text
|
2020-03-25 01:39:02 +03:00
|
|
|
|
2021-07-25 02:18:36 +03:00
|
|
|
. += 0x1000;
|
2020-03-26 03:37:56 +03:00
|
|
|
|
2021-07-25 02:18:36 +03:00
|
|
|
.stivalehdr : {
|
|
|
|
KEEP(*(.stivalehdr))
|
|
|
|
} :rodata
|
2020-03-25 01:39:02 +03:00
|
|
|
|
2021-07-25 02:18:36 +03:00
|
|
|
.stivale2hdr : {
|
|
|
|
KEEP(*(.stivale2hdr))
|
|
|
|
} :rodata
|
2020-03-25 01:39:02 +03:00
|
|
|
|
2021-07-25 02:18:36 +03:00
|
|
|
.rodata : {
|
2021-03-26 18:24:28 +03:00
|
|
|
*(.rodata*)
|
2021-07-25 02:18:36 +03:00
|
|
|
} :rodata
|
2020-03-25 01:39:02 +03:00
|
|
|
|
2021-07-25 02:18:36 +03:00
|
|
|
. += 0x1000;
|
|
|
|
|
|
|
|
.data : {
|
2021-03-26 18:24:28 +03:00
|
|
|
*(.data*)
|
2021-07-25 02:18:36 +03:00
|
|
|
} :data
|
|
|
|
|
2021-10-29 20:51:22 +03:00
|
|
|
.dynamic : {
|
|
|
|
*(.dynamic)
|
|
|
|
} :data :dynamic
|
|
|
|
|
2021-07-25 02:18:36 +03:00
|
|
|
.bss : {
|
2021-03-26 18:24:28 +03:00
|
|
|
*(COMMON)
|
|
|
|
*(.bss*)
|
2021-07-25 02:18:36 +03:00
|
|
|
} :data
|
2020-03-25 01:39:02 +03:00
|
|
|
}
|