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]

overlays with last section empty


Stripping empty sections interacts badly with overlay handling.  The
last section of an overlay arranges to set "dot" just past the end of
the largest overlay.  If this section is not processed, "dot" remains
at the start of the overlay region.

	* ldlang.c (strip_excluded_output_sections): Don't ignore sections
	with update_dot_tree.

Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.266
diff -u -p -r1.266 ldlang.c
--- ld/ldlang.c	12 Jul 2007 01:40:25 -0000	1.266
+++ ld/ldlang.c	13 Jul 2007 07:17:15 -0000
@@ -3380,7 +3380,8 @@ strip_excluded_output_sections (void)
 	{
 	  /* We don't set bfd_section to NULL since bfd_section of the
 	     removed output section statement may still be used.  */
-	  if (!os->section_relative_symbol)
+	  if (!os->section_relative_symbol
+	      && !os->update_dot_tree)
 	    os->ignored = TRUE;
 	  output_section->flags |= SEC_EXCLUDE;
 	  bfd_section_list_remove (output_bfd, output_section);

-- 
Alan Modra
Australia Development Lab, IBM


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