Skip to content

Commit

Permalink
oro: add .oro sections(s) to an oro header
Browse files Browse the repository at this point in the history
  • Loading branch information
Qix- committed Jan 14, 2025
1 parent a379e12 commit 42b5c50
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions oro/x86_64.ld
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ OUTPUT_ARCH(i386:x86-64)
ENTRY(_oro_start)

PHDRS {
text PT_LOAD FLAGS((1 << 0) | (1 << 2)); /* rx */
rodata PT_LOAD FLAGS((1 << 2) ); /* r */
data PT_LOAD FLAGS((1 << 1) | (1 << 2)); /* rw */
text PT_LOAD FLAGS((1 << 0) | (1 << 2)); /* rx */
rodata PT_LOAD FLAGS((1 << 2) ); /* r */
data PT_LOAD FLAGS((1 << 1) | (1 << 2)); /* rw */
oro PT_LOAD FLAGS((1 << 2) | (1 << 22)); /* r + oro */
}

SECTIONS {
Expand All @@ -18,6 +19,10 @@ SECTIONS {

. = ALIGN(4096);

.oro : {
KEEP(*(.oro .oro.*))
} :oro

.rodata : {
*(.rodata .rodata.*)
} :rodata
Expand Down

0 comments on commit 42b5c50

Please sign in to comment.