diff options
author | David S. Miller <davem@redhat.com> | 1998-05-23 04:35:34 +0000 |
---|---|---|
committer | David S. Miller <davem@redhat.com> | 1998-05-23 04:35:34 +0000 |
commit | 1f5ed31e30b58cda608447b5f7c0d1532ab19eb9 (patch) | |
tree | 4de7ef8c5435d55ab8d94151be1b610c8dc98c83 | |
parent | 0d1f3079f1218e83a41c47176c73329c46a47687 (diff) | |
download | glibc-1f5ed31e30b58cda608447b5f7c0d1532ab19eb9.zip glibc-1f5ed31e30b58cda608447b5f7c0d1532ab19eb9.tar.gz glibc-1f5ed31e30b58cda608447b5f7c0d1532ab19eb9.tar.bz2 |
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_fixup_plt):cvs/sparc-2_0_x-branch
Always perform the flush during RTLD_BOOTSTRAP.
-rw-r--r-- | ChangeLog.SPARC | 5 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/dl-machine.h | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog.SPARC b/ChangeLog.SPARC index b5ed4f3..c12a5c2 100644 --- a/ChangeLog.SPARC +++ b/ChangeLog.SPARC @@ -1,3 +1,8 @@ +1998-05-23 David S. Miller <davem@dm.cobaltmicro.com> + + * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_fixup_plt): + Always perform the flush during RTLD_BOOTSTRAP. + 1998-05-21 David S. Miller <davem@dm.cobaltmicro.com> * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Add diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h index ef041e2..fde559d 100644 --- a/sysdeps/sparc/sparc32/dl-machine.h +++ b/sysdeps/sparc/sparc32/dl-machine.h @@ -274,6 +274,10 @@ elf_machine_fixup_plt (struct link_map *map, const Elf32_Rela *reloc, if we execute it and hw does not support it. */ __asm ("" : "=r" (hwcap) : "0" (hwcap)); do_flush = (!hwcap || (*hwcap & HWCAP_SPARC_FLUSH)); +#else + /* 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 @@ -282,16 +286,12 @@ elf_machine_fixup_plt (struct link_map *map, const Elf32_Rela *reloc, But we also can't tell if we _can_ use flush, so don't. */ reloc_addr[2] = OPCODE_JMP_G1 | (value & 0x3ff); -#ifndef RTLD_BOOTSTRAP if (do_flush) __asm __volatile ("flush %0+8" : : "r"(reloc_addr)); -#endif reloc_addr[1] = OPCODE_SETHI_G1 | (value >> 10); -#ifndef RTLD_BOOTSTRAP if (do_flush) __asm __volatile ("flush %0+4" : : "r"(reloc_addr)); -#endif } #ifdef RESOLVE |