about summary refs log tree commit diff
path: root/sysdeps/sparc/sparc32/dl-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sparc/sparc32/dl-machine.h')
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index 348e0a4bbe..f08eb0381a 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -271,7 +271,9 @@ elf_machine_fixup_plt (struct link_map *map, const Elf32_Rela *reloc,
   unsigned long *hwcap = WEAKADDR(_dl_hwcap);
   int do_flush = (!hwcap || (*hwcap & HWCAP_SPARC_FLUSH));
 #else
-  int do_flush = 0;
+  /* Unfortunately, this is necessary, so that we can ensure
+     ld.so will not execute corrupt PLT entry instructions. */
+  const int do_flush = 1;
 #endif
 
   /* For thread safety, write the instructions from the bottom and