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]

Re: binutils-2.19.90 snapshot is available


On Thu, Oct 08, 2009 at 09:11:02PM -0700, H.J. Lu wrote:
> This patch may have caused:
> 
> http://sourceware.org/bugzilla/show_bug.cgi?id=10749

Yes, it did.  I'm going to apply the following patch to both
mainline and branch, and revert my 2009-09-28 patch
http://sourceware.org/ml/binutils/2009-09/msg00646.html on the
branch.

I'd like to see what breaks if I leave my 2009-09-28 change in
mainline.  As a very old comment in the ELF linker scripts said,
zeroing vma for ld -r was to avoid bugs in the Solaris linker.  Those
bugs may now be fixed.

	PR ld/10749
	* ldlang.c (lang_size_sections_1): Zero section vmas only for COFF.

Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.322
diff -u -p -r1.322 ldlang.c
--- ld/ldlang.c	8 Oct 2009 01:00:27 -0000	1.322
+++ ld/ldlang.c	9 Oct 2009 05:07:38 -0000
@@ -4665,7 +4665,13 @@ lang_size_sections_1
 	    lang_memory_region_type *r;
 
 	    os = &s->output_section_statement;
-	    if (os->addr_tree == NULL && link_info.relocatable)
+	    /* FIXME: We shouldn't need to zero section vmas for ld -r
+	       here, in lang_insert_orphan, or in the default linker scripts.
+	       This is covering for coff backend linker bugs.  See PR6945.  */
+	    if (os->addr_tree == NULL
+		&& link_info.relocatable
+		&& (bfd_get_flavour (link_info.output_bfd)
+		    == bfd_target_coff_flavour))
 	      os->addr_tree = exp_intop (0);
 	    if (os->addr_tree != NULL)
 	      {

-- 
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]