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 */
|
|
|
|
dynamic PT_DYNAMIC FLAGS((1 << 1) | (1 << 2)) ; /* Dynamic segment needed for PIE */
|
|
|
|
}
|
|
|
|
|
2020-09-30 01:31:42 +03:00
|
|
|
SECTIONS
|
|
|
|
{
|
2021-07-25 02:18:36 +03:00
|
|
|
. = 0xffffffff80200000;
|
|
|
|
|
|
|
|
.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
|
|
|
|
|
|
|
|
.dynamic : {
|
|
|
|
*(.dynamic)
|
|
|
|
} :data :dynamic
|
2020-09-30 01:31:42 +03:00
|
|
|
|
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
|
|
|
}
|