summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2003-01-24 00:43:29 +0000
committerdrahn <drahn@openbsd.org>2003-01-24 00:43:29 +0000
commit3e9aa1945ac1ed29a093bda5dc123106cc0fa874 (patch)
treea73482f48d38d464ee915b601b76305ff780a141
parentHonour TCP_WRAPPERS mk.conf setting; ok millert@ (diff)
downloadwireguard-openbsd-3e9aa1945ac1ed29a093bda5dc123106cc0fa874.tar.xz
wireguard-openbsd-3e9aa1945ac1ed29a093bda5dc123106cc0fa874.zip
Flush the blrl instruction from the instruction cache if the GOT tag is
present. Fixes illegal instruction problems seen the last few days tested by myself and matthieu@
-rw-r--r--libexec/ld.so/powerpc/rtld_machine.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/ld.so/powerpc/rtld_machine.c b/libexec/ld.so/powerpc/rtld_machine.c
index 5e44c314f04..8fc17624352 100644
--- a/libexec/ld.so/powerpc/rtld_machine.c
+++ b/libexec/ld.so/powerpc/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.19 2002/12/18 19:20:02 drahn Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.20 2003/01/24 00:43:29 drahn Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -45,6 +45,7 @@
#include "archdep.h"
#include "resolve.h"
+void _dl_syncicache(char *from, size_t len);
/* relocation bits */
#define HA(x) (((Elf_Addr)(x) >> 16) + (((Elf_Addr)(x) & 0x00008000) >> 15))
@@ -517,6 +518,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
if (object->got_addr != NULL && object->got_size != 0)
_dl_mprotect((void*)object->got_addr, object->got_size,
PROT_READ|PROT_EXEC); /* only PPC is PROT_EXE */
+ _dl_syncicache((void*)object->got_addr, 4);
if (object->plt_addr != NULL && object->plt_size != 0)
_dl_mprotect((void*)object->plt_addr, object->plt_size,
PROT_READ|PROT_EXEC);