diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-03-26 18:50:49 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-03-26 18:50:49 +0000 |
commit | 4bb9f2e4ead9d46937b677111281cfe6f4ef8606 (patch) | |
tree | 9d29702f6d555cb7ed37b6c3cad48c97668c1f38 | |
parent | 9d9ec46729101ab02560e10d83a581635fcc035d (diff) |
Recommit the change that explicitly passes %sr0 to fic instructions. miod@ is
still puzzled why this didn't work back in 2010, but it does work now and
paves the way for binutils 2.17 on hppa. Obviously based on miod@'s earlier
diff.
ok miod@
-rw-r--r-- | libexec/ld.so/hppa/rtld_machine.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libexec/ld.so/hppa/rtld_machine.c b/libexec/ld.so/hppa/rtld_machine.c index 2bb4a0e2b63..fdb8ee17634 100644 --- a/libexec/ld.so/hppa/rtld_machine.c +++ b/libexec/ld.so/hppa/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.25 2012/12/05 23:20:06 deraadt Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.26 2013/03/26 18:50:48 kettenis Exp $ */ /* * Copyright (c) 2004 Michael Shalayeff @@ -367,13 +367,8 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) __asm __volatile("fdc 0(%0)" :: "r" (&got[-7])); __asm __volatile("fdc 0(%0)" :: "r" (&got[-6])); __asm __volatile("sync"); -#if 0 __asm __volatile("fic 0(%%sr0,%0)" :: "r" (&got[-7])); __asm __volatile("fic 0(%%sr0,%0)" :: "r" (&got[-6])); -#else - __asm __volatile("fic 0(%0)" :: "r" (&got[-7])); - __asm __volatile("fic 0(%0)" :: "r" (&got[-6])); -#endif __asm __volatile("sync"); /* @@ -393,8 +388,8 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) __asm __volatile("fdc 0(%0)" :: "r" (&got[-2])); __asm __volatile("fdc 0(%0)" :: "r" (&got[-1])); __asm __volatile("sync"); - __asm __volatile("fic 0(%0)" :: "r" (&got[-2])); - __asm __volatile("fic 0(%0)" :: "r" (&got[-1])); + __asm __volatile("fic 0(%%sr0,%0)" :: "r" (&got[-2])); + __asm __volatile("fic 0(%%sr0,%0)" :: "r" (&got[-1])); __asm __volatile("sync"); for (i = 0; i < numrela; i++, rela++) { Elf_Addr *r_addr = (Elf_Addr *)(ooff + rela->r_offset); |