summaryrefslogtreecommitdiff
path: root/libexec/ld.so
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-01-14 05:24:08 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-01-14 05:24:08 +0000
commita7e59cad598affb623897fa42245e63b2841e4a5 (patch)
tree0085afbbbba4536c30ad7e6f03f0855ec253e7ff /libexec/ld.so
parent790b2be12d2c8c46b93e12db075e2a6006cd4dd3 (diff)
Do not bogusly attempt to mprotect ld.so's .rodata area RW at bootstrap
time: the logic is wrong, and there are no relocations to apply to .rodata anyway. ok jsing@ kettenis@
Diffstat (limited to 'libexec/ld.so')
-rw-r--r--libexec/ld.so/mips64/ldasm.S22
1 files changed, 1 insertions, 21 deletions
diff --git a/libexec/ld.so/mips64/ldasm.S b/libexec/ld.so/mips64/ldasm.S
index 4eff70f157f..2d7c19c28f5 100644
--- a/libexec/ld.so/mips64/ldasm.S
+++ b/libexec/ld.so/mips64/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.7 2012/11/01 19:37:50 kettenis Exp $ */
+/* $OpenBSD: ldasm.S,v 1.8 2013/01/14 05:24:07 miod Exp $ */
/*
* Copyright (c) 1998-2002 Opsycon AB, Sweden.
@@ -50,26 +50,6 @@ LEAF(_dl_start, FRAMESZ) /* Not really LEAF, but we simplify */
bgezal zero, 1f
1:
PTR_SUBU s0, ra, s1 # This is the load offset
- LA t0, _fdata
- PTR_SRL t0, 20 # check if distance is > 2**16.
- beqz t0, 2f
- li t0, 0x10000
-
- li t0, 0x100000
-2:
-
- # This is a hack to change protection of .rodata so it
- # can be relocated. A better way to find the location
- # of .rodata should probably be used.
- # We know that .rodata is aligned on 0x100000 or 0x10000
- # and is at most 64 k in size.
- li v0, SYS_mprotect
- or a0, ra, 0xfff
- xor a0, 0xfff
- PTR_ADDU a0, t0
- li a1, 0x10000
- li a2, 7 /* (PROT_READ|PROT_WRITE|PROT_EXEC) */
- syscall
PTR_ADDU a0, sp, FRAMESZ # Where stack info is.
PTR_ADDU a1, sp, 0 # Where fast AUX info will be.