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]
Other format: [Raw text]

year-old mips bfd FIXME breaks shared libstdc++


I ran into some bfd assertions that led to crashes in C++ programs
linked with a shared libstdc++ on mips64-linux-gnu.  This simple patch
fixed the problems.  It is safe to skip the relocation, since the
caller will apply the relocation with the correct value.  Ok to
install?

Index: bfd/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
	_bfd_elf_section_offset returning -2 the same way as -1.

Index: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.38
diff -u -p -r1.38 elfxx-mips.c
--- bfd/elfxx-mips.c 23 Jan 2003 11:51:33 -0000 1.38
+++ bfd/elfxx-mips.c 26 Jan 2003 03:01:03 -0000
@@ -2957,11 +2957,9 @@ mips_elf_create_dynamic_relocation (outp
     }
 #endif
 
-  if (outrel[0].r_offset == (bfd_vma) -1)
+  if (outrel[0].r_offset == (bfd_vma) -1
+      || outrel[0].r_offset == (bfd_vma) -2)
     skip = TRUE;
-  /* FIXME: For -2 runtime relocation needs to be skipped, but
-     properly resolved statically and installed.  */
-  BFD_ASSERT (outrel[0].r_offset != (bfd_vma) -2);
 
   /* If we've decided to skip this relocation, just output an empty
      record.  Note that R_MIPS_NONE == 0, so that this call to memset
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

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