summaryrefslogtreecommitdiff
path: root/libexec/ld.so/hppa
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2023-12-20 14:50:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2023-12-20 14:50:10 +0000
commitd5c191091afc90123489dfe067d1eee94c9a2579 (patch)
tree1a18e82715667376a9fe9184ba345e21adba40fd /libexec/ld.so/hppa
parentd80fc78a208a8bc3efbfe6d545360d0cde5ee065 (diff)
For strange reasons which made sense at the time, the text segment was
placed head of the btext (boot.text) segment. (the boot.text segment is "unmapped" after initization, as a self-protection mechanism). this meant the LOAD's virtual addresses were not in sequence, which clearly isn't what we intended.
Diffstat (limited to 'libexec/ld.so/hppa')
-rw-r--r--libexec/ld.so/hppa/ld.script6
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/ld.so/hppa/ld.script b/libexec/ld.so/hppa/ld.script
index 163c667a7a8..6ea4aab5728 100644
--- a/libexec/ld.so/hppa/ld.script
+++ b/libexec/ld.so/hppa/ld.script
@@ -1,8 +1,8 @@
PHDRS
{
rodata PT_LOAD FILEHDR PHDRS FLAGS (4);
- text PT_LOAD FLAGS (1);
btext PT_LOAD FLAGS (0x08000005);
+ text PT_LOAD FLAGS (1);
pltgot PT_LOAD;
data PT_LOAD;
random PT_OPENBSD_RANDOMIZE;
@@ -24,8 +24,6 @@ SECTIONS
/* TEXT */
. = ALIGN(0x1000);
- .text : { *(.text .text.*) } :text
- . = ALIGN(0x1000);
.boot.text :
{
. = ALIGN(0x1000);
@@ -34,6 +32,8 @@ SECTIONS
. = ALIGN(0x1000);
boot_text_end = .;
} :btext
+ . = ALIGN(0x1000);
+ .text : { *(.text .text.*) } :text
/* PLT and GOT */
. = ALIGN(0x1000);