Limine Bare Bones: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
No edit summary
No edit summary
Line 173: Line 173:
PHDRS
PHDRS
{
{
requests PT_LOAD FLAGS(0x06); /* Write + Read */
text PT_LOAD FLAGS(0x05); /* Execute + Read */
text PT_LOAD FLAGS(0x05); /* Execute + Read */
rodata PT_LOAD FLAGS(0x04); /* Read only */
rodata PT_LOAD FLAGS(0x04); /* Read only */
Line 187: Line 186:
/* that is the beginning of the region. */
/* that is the beginning of the region. */
. = 0xffffffff80000000;
. = 0xffffffff80000000;

/* Define a section to contain the Limine requests and assign it to its own PHDR */
.requests : {
KEEP(*(.requests_start_marker))
KEEP(*(.requests))
KEEP(*(.requests_end_marker))
} :requests

/* Move to the next memory page for .text */
. = ALIGN(CONSTANT(MAXPAGESIZE));


.text : {
.text : {
Line 214: Line 203:
.data : {
.data : {
*(.data .data.*)
*(.data .data.*)

/* Place the sections that contain the Limine requests as part of the .data */
/* output section. */
KEEP(*(.requests_start_marker))
KEEP(*(.requests))
KEEP(*(.requests_end_marker))
} :data
} :data


Line 237: Line 232:


/* Discard .note.* and .eh_frame since they may cause issues on some hosts. */
/* Discard .note.* and .eh_frame since they may cause issues on some hosts. */
/* Also discard the program interpreter section since we do not need one. This is */
/* more or less equivalent to the --no-dynamic-linker linker flag, except that it */
/* works with ld.gold. */
/DISCARD/ : {
/DISCARD/ : {
*(.eh_frame)
*(.eh_frame)
*(.note .note.*)
*(.note .note.*)
*(.interp)
}
}
}
}