rulimine/test/linker.ld

50 lines
894 B
Plaintext
Raw Normal View History

ENTRY(stivale_main)
2020-03-25 01:39:02 +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 */
}
SECTIONS
{
. = 0xffffffff80000000;
2022-03-18 01:46:48 +03:00
kernel_start = .;
.text : {
*(.text*)
} :text
2020-03-25 01:39:02 +03:00
. += 0x1000;
2020-03-26 03:37:56 +03:00
.stivalehdr : {
KEEP(*(.stivalehdr))
} :rodata
2020-03-25 01:39:02 +03:00
.stivale2hdr : {
KEEP(*(.stivale2hdr))
} :rodata
2020-03-25 01:39:02 +03:00
.rodata : {
*(.rodata*)
} :rodata
2020-03-25 01:39:02 +03:00
. += 0x1000;
.data : {
*(.data*)
} :data
.dynamic : {
*(.dynamic)
} :data :dynamic
.bss : {
*(COMMON)
*(.bss*)
} :data
2020-03-25 01:39:02 +03:00
}