This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

[PATCH] MIPS bfd: Tighten next relocation test


Hello All,

I applied the appended patch, it tightens the test for the next related
relocation by checking also the symbol index.


Thiemo


2006-07-25  Thiemo Seufer  <ths@networkno.de>

	* elfxx-mips.c (mips_elf_next_relocation): Tighten check to test
	also for same symbol.


Index: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.175
diff -u -p -r1.175 elfxx-mips.c
--- bfd/elfxx-mips.c	18 Jul 2006 08:56:44 -0000	1.175
+++ bfd/elfxx-mips.c	24 Jul 2006 11:21:01 -0000
@@ -3583,9 +3583,12 @@ mips_elf_next_relocation (bfd *abfd ATTR
 			  const Elf_Internal_Rela *relocation,
 			  const Elf_Internal_Rela *relend)
 {
+  unsigned long r_symndx = ELF_R_SYM (abfd, relocation->r_info);
+
   while (relocation < relend)
     {
-      if (ELF_R_TYPE (abfd, relocation->r_info) == r_type)
+      if (ELF_R_TYPE (abfd, relocation->r_info) == r_type
+	  && ELF_R_SYM (abfd, relocation->r_info) == r_symndx)
 	return relocation;
 
       ++relocation;


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