about summary refs log tree commit diff
path: root/sysdeps/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h12
-rw-r--r--sysdeps/sparc/sparc32/setjmp.S6
-rw-r--r--sysdeps/sparc/sparc64/dl-machine.h8
-rw-r--r--sysdeps/sparc/sparc64/sub_n.S4
4 files changed, 23 insertions, 7 deletions
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index 288a140245..224c6bafff 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -240,6 +240,8 @@ static inline void
 elf_machine_fixup_plt (struct link_map *map, const Elf32_Rela *reloc,
 		       Elf32_Addr *reloc_addr, Elf32_Addr value)
 {
+  extern unsigned long _dl_hwcap;
+
   /* For thread safety, write the instructions from the bottom and
      flush before we overwrite the critical "b,a".  This of course
      need not be done during bootstrapping, since there are no threads.
@@ -258,6 +260,14 @@ elf_machine_fixup_plt (struct link_map *map, const Elf32_Rela *reloc,
 #endif
 }
 
+/* Return the final value of a plt relocation.  */
+static inline Elf32_Addr
+elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
+		       Elf32_Addr value)
+{
+  return value + reloc->r_addend;
+}
+
 #ifdef RESOLVE
 
 /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
@@ -268,8 +278,6 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 		  const Elf32_Sym *sym, const struct r_found_version *version,
 		  Elf32_Addr *const reloc_addr)
 {
-  extern unsigned long _dl_hwcap;
-
   if (ELF32_R_TYPE (reloc->r_info) == R_SPARC_RELATIVE)
     {
 #ifndef RTLD_BOOTSTRAP
diff --git a/sysdeps/sparc/sparc32/setjmp.S b/sysdeps/sparc/sparc32/setjmp.S
index 58d94119ef..44dcadb66e 100644
--- a/sysdeps/sparc/sparc32/setjmp.S
+++ b/sysdeps/sparc/sparc32/setjmp.S
@@ -22,10 +22,10 @@
 #define _ASM 1
 #include <bits/setjmp.h>
 
-ENTRY(_setjmp)
+ENTRY(__setjmp)
 	b	1f
 	 set	0, %o1
-END(_setjmp)
+END(__setjmp)
 
 ENTRY(setjmp)
 	set	1, %o1
@@ -46,5 +46,5 @@ ENTRY (__sigsetjmp)
 	 mov	%g1, %o7
 END(__sigsetjmp)
 
-weak_extern(_setjmp)
+weak_alias(__setjmp, _setjmp)
 weak_extern(setjmp)
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
index 226623152d..354fea6ce5 100644
--- a/sysdeps/sparc/sparc64/dl-machine.h
+++ b/sysdeps/sparc/sparc64/dl-machine.h
@@ -85,6 +85,14 @@ elf_machine_fixup_plt(struct link_map *map, const Elf64_Rela *reloc,
     }
 }
 
+/* Return the final value of a plt relocation.  */
+static inline Elf64_Addr
+elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
+		       Elf64_Addr value)
+{
+  return value + reloc->r_addend;
+}
+
 #ifdef RESOLVE
 
 /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
diff --git a/sysdeps/sparc/sparc64/sub_n.S b/sysdeps/sparc/sparc64/sub_n.S
index 93f8a8235d..403d50c704 100644
--- a/sysdeps/sparc/sparc64/sub_n.S
+++ b/sysdeps/sparc/sparc64/sub_n.S
@@ -1,7 +1,7 @@
 /* SPARC v9 __mpn_sub_n -- Subtract two limb vectors of the same length > 0
    and store difference in a third limb vector.
 
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
 
    This file is part of the GNU MP Library.
 
@@ -43,7 +43,7 @@ ENTRY(__mpn_sub_n)
 	ldx [%o1+%o5],%g2		! load s1 limb
 	addcc %g1,%o4,%g1		! add s2 limb and carry variable
 	movcc %xcc,0,%o4		! if carry-out, o4 was 1; clear it
-	subcc %g1,%g2,%g1		! subtract s1 limb from sum
+	subcc %g2,%g1,%g1		! subtract s1 limb from sum
 	stx %g1,[%o0+%o5]		! store result
 	add %o5,8,%o5			! increment address index
 	brnz,pt %g3,1b