From f8b4a766de2be2a507d2dd0f699a5b2926c67df8 Mon Sep 17 00:00:00 2001 From: nwhitehorn Date: Sat, 17 Dec 2011 16:20:27 +0000 Subject: Additional icache paranoia: non-PLT relocations can modify the text segment. It is then important to make sure the icache is synchronized again to prevent (rare) random seg faults and illegal instructions. MFC after: 3 days --- libexec/rtld-elf/powerpc/reloc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libexec/rtld-elf/powerpc') diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index c8967b6..d0637f4 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -317,6 +317,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate) done: if (cache != NULL) free(cache); + + /* Synchronize icache for text seg in case we made any changes */ + __syncicache(obj->mapbase, obj->textsize); + return (r); } -- cgit v1.1