diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-01-26 20:41:40 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-01-26 20:41:40 +0000 |
commit | bb5cd44404ca8b7b684998970458a4e20759f4e6 (patch) | |
tree | e35788b42e601593aa3811f5679bad3cb97c97ed /libexec/ld.so/m88k | |
parent | ca2b60a6be2f0b91b67396f7ec5fbf6e8e98b063 (diff) |
Make sure to flush I$ over the plt in case of non-lazy relocation as well.
Diffstat (limited to 'libexec/ld.so/m88k')
-rw-r--r-- | libexec/ld.so/m88k/rtld_machine.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libexec/ld.so/m88k/rtld_machine.c b/libexec/ld.so/m88k/rtld_machine.c index 6a386324a9d..a867c3f10d1 100644 --- a/libexec/ld.so/m88k/rtld_machine.c +++ b/libexec/ld.so/m88k/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.3 2013/01/23 19:01:44 miod Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.4 2013/01/26 20:41:39 miod Exp $ */ /* * Copyright (c) 2013 Miodrag Vallat. @@ -316,11 +316,6 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) object->obj_base + rela->r_addend, *addr + object->obj_base); } - /* - * Force a cache sync on the whole plt here, - * otherwise I$ might have stale information. - */ - _dl_cacheflush(object->plt_start, object->plt_size); } } @@ -329,9 +324,15 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) PROT_READ); } if (object->plt_size != 0) { - if (!lazy || object->obj_base != 0) + if (!lazy || object->obj_base != 0) { + /* + * Force a cache sync on the whole plt here, + * otherwise I$ might have stale information. + */ + _dl_cacheflush(object->plt_start, object->plt_size); _dl_mprotect((void*)object->plt_start, object->plt_size, PROT_READ | PROT_EXEC); + } } return (fails); |