rpms/binutils/devel binutils-2.19.51.0.11-orphan-section-placement.patch, NONE, 1.1 binutils.spec, 1.168, 1.169

Nicholas Clifton nickc at fedoraproject.org
Tue Jul 14 10:00:42 UTC 2009


Author: nickc

Update of /cvs/pkgs/rpms/binutils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14845

Modified Files:
	binutils.spec 
Added Files:
	binutils-2.19.51.0.11-orphan-section-placement.patch 
Log Message:
Import orphan section placement patch from mainline.  (BZ 510384)


binutils-2.19.51.0.11-orphan-section-placement.patch:

--- NEW FILE binutils-2.19.51.0.11-orphan-section-placement.patch ---
--- ../binutils-2.19.51.0.11.orig/ld/ldlang.c	2009-07-14 11:42:46.000000000 +0100
+++ ld/ldlang.c	2009-07-14 11:55:01.000000000 +0100
@@ -1615,10 +1615,12 @@ output_prev_sec_find (lang_output_sectio
    idea is to skip over anything that might be inside a SECTIONS {}
    statement in a script, before we find another output section
    statement.  Assignments to "dot" before an output section statement
-   are assumed to belong to it.  An exception to this rule is made for
-   the first assignment to dot, otherwise we might put an orphan
-   before . = . + SIZEOF_HEADERS or similar assignments that set the
-   initial address.  */
+   are assumed to belong to it, except in two cases;  The first
+   assignment to dot, and assignments before non-alloc sections.
+   Otherwise we might put an orphan before . = . + SIZEOF_HEADERS or
+   similar assignments that set the initial address, or we might
+   insert non-alloc note sections among assignments setting end of
+   image symbols.  */
 
 static lang_statement_union_type **
 insert_os_after (lang_output_section_statement_type *after)
@@ -1662,7 +1664,12 @@ insert_os_after (lang_output_section_sta
 	  continue;
 	case lang_output_section_statement_enum:
 	  if (assign != NULL)
-	    where = assign;
+	    {
+	      asection *s = (*where)->output_section_statement.bfd_section;
+
+	      if (s == NULL || (s->flags & SEC_ALLOC) != 0)
+		where = assign;
+	    }
 	  break;
 	case lang_input_statement_enum:
 	case lang_address_statement_enum:


Index: binutils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/binutils/devel/binutils.spec,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -p -r1.168 -r1.169
--- binutils.spec	14 Jul 2009 09:48:32 -0000	1.168
+++ binutils.spec	14 Jul 2009 10:00:42 -0000	1.169
@@ -17,7 +17,7 @@
 Summary: A GNU collection of binary utilities
 Name: %{?cross}binutils%{?_with_debug:-debug}
 Version: 2.19.51.0.11
-Release: 25%{?dist}
+Release: 26%{?dist}
 License: GPLv3+
 Group: Development/Tools
 URL: http://sources.redhat.com/binutils
@@ -30,6 +30,7 @@ Patch04: binutils-2.19.51.0.10-envvar-re
 Patch05: binutils-2.19.51.0.10-version.patch
 Patch06: binutils-2.19.51.0.10-set-long-long.patch
 Patch07: binutils-2.19.51.0.10-build-id.patch
+Patch08: binutils-2.19.51.0.11-orphan-section-placement.patch
 
 %if 0%{?_with_debug:1}
 # Define this if you want to skip the strip step and preserve debug info.
@@ -101,6 +102,7 @@ to consider using libelf instead of BFD.
 %patch05 -p0 -b .version~
 %patch06 -p0 -b .set-long-long~
 %patch07 -p0 -b .build-id~
+%patch08 -p0 -b .orphan-section-placement~
 
 # We cannot run autotools as there is an exact requirement of autoconf-2.59.
 
@@ -351,6 +353,9 @@ fi
 %endif # %{isnative}
 
 %changelog
+* Tue Jul 14 2009 Nick Clifton <nickc at redhat.com> 2.19.51.0.11-26
+- Import orphan section placement patch from mainline.  (BZ 510384)
+
 * Tue Jul 14 2009 Nick Clifton <nickc at redhat.com> 2.19.51.0.11-25
 - Fix build-id patch to avoid memory corruption.  (BZ 501582)
 




More information about the fedora-extras-commits mailing list