This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Fix sparc64 .plt[32768+] slots


Hi!

I've commited the following fix. After fixing glibc too (to be posted
tomorrow) sparc64 works even with more than 32K plt entries
(such a test is part of my prelinker testsuite).

2001-09-25  Jakub Jelinek  <jakub@redhat.com>

	* elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
	computation.

--- bfd/elf64-sparc.c.jj	Mon Sep 24 18:15:45 2001
+++ bfd/elf64-sparc.c	Tue Sep 25 20:55:04 2001
@@ -921,8 +921,8 @@ sparc64_elf_build_plt (output_bfd, conte
 	  entry = contents + i*PLT_ENTRY_SIZE + j*4*6;
 	  ptr = contents + i*PLT_ENTRY_SIZE + block*4*6 + j*8;
 
-	  /* ldx [%o7 + ptr - entry+4], %g1 */
-	  ldx = 0xc25be000 | ((ptr - entry+4) & 0x1fff);
+	  /* ldx [%o7 + ptr - (entry+4)], %g1 */
+	  ldx = 0xc25be000 | ((ptr - (entry+4)) & 0x1fff);
 
 	  /* mov %o7,%g5
 	     call .+8

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]