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]

Fix NOCROSSREFS 3 for MIPS Linux


This obvious patch prevents ld from crashing when .got is non-empty
but DISCARD'd.  Not a very useful thing to do for real binaries, but
used in ld testing.  Checked in.

-- 
Daniel Jacobowitz
CodeSourcery

2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>

	* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Make sure .got
	will be output.

Index: elfxx-mips.c
===================================================================
--- elfxx-mips.c	(revision 181978)
+++ elfxx-mips.c	(working copy)
@@ -8917,7 +8917,8 @@ _bfd_mips_elf_finish_dynamic_sections (b
 	memset (b - dyn_skipped, 0, dyn_skipped);
     }
 
-  if (sgot != NULL && sgot->size > 0)
+  if (sgot != NULL && sgot->size > 0
+      && !bfd_is_abs_section (sgot->output_section))
     {
       if (htab->is_vxworks)
 	{


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