summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.so/aarch64/ld.script6
-rw-r--r--libexec/ld.so/amd64/ld.script8
2 files changed, 9 insertions, 5 deletions
diff --git a/libexec/ld.so/aarch64/ld.script b/libexec/ld.so/aarch64/ld.script
index d0231259a0b..3c4434bb8b4 100644
--- a/libexec/ld.so/aarch64/ld.script
+++ b/libexec/ld.so/aarch64/ld.script
@@ -2,6 +2,7 @@ PHDRS
{
rodata PT_LOAD FILEHDR PHDRS FLAGS (4);
text PT_LOAD;
+ btext PT_LOAD FLAGS (0x08000005);
data PT_LOAD;
random PT_OPENBSD_RANDOMIZE;
relro PT_GNU_RELRO;
@@ -22,13 +23,14 @@ SECTIONS
/* TEXT */
. = ALIGN(0x10000);
.text : { *(.text .text.*) } :text
- . = ALIGN(0x1000);
.boot.text :
{
+ . = ALIGN(0x1000);
boot_text_start = .;
*(.boot.text)
+ . = ALIGN(0x1000);
boot_text_end = .;
- } :text
+ } :btext
/* RELRO DATA */
. = DATA_SEGMENT_ALIGN (0x10000, 0x1000);
diff --git a/libexec/ld.so/amd64/ld.script b/libexec/ld.so/amd64/ld.script
index 5629239dd52..29f4e14d844 100644
--- a/libexec/ld.so/amd64/ld.script
+++ b/libexec/ld.so/amd64/ld.script
@@ -2,6 +2,7 @@ PHDRS
{
rodata PT_LOAD FILEHDR PHDRS FLAGS (4);
text PT_LOAD;
+ btext PT_LOAD FLAGS (0x08000005);
data PT_LOAD;
random PT_OPENBSD_RANDOMIZE;
relro PT_GNU_RELRO;
@@ -20,14 +21,15 @@ SECTIONS
.eh_frame : { *(.eh_frame) } :rodata
/* TEXT */
- . = ALIGN(0x100000) + (. & (0x100000 - 1)) + 0;
+ . = ALIGN(0x1000);
.boot.text :
{
+ . = ALIGN(0x1000);
boot_text_start = .;
*(.boot.text)
+ . = ALIGN(0x1000);
boot_text_end = .;
- } :text =0xcccccccc
- . = ALIGN(0x1000);
+ } :btext =0xcccccccc
.text : { *(.text .text.*) } :text =0xcccccccc
/* RELRO DATA */