[oe-commits] Dmitry Eremin-Solenikov : binutils-2.18: add a stolen from head patch that fixes building of u-boot on powerpc

git version control git at git.openembedded.org
Fri Jul 17 10:42:11 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 54dfc8da23a6990dc84f5de94968e4b212447594
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=54dfc8da23a6990dc84f5de94968e4b212447594

Author: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
Date:   Fri Jul 17 14:18:10 2009 +0400

binutils-2.18: add a stolen from head patch that fixes building of u-boot on powerpc

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>

---

 .../binutils-section-in-segment.patch              |   30 ++++++++++++++++++++
 recipes/binutils/binutils_2.18.bb                  |    3 +-
 2 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/recipes/binutils/binutils-2.18/binutils-section-in-segment.patch b/recipes/binutils/binutils-2.18/binutils-section-in-segment.patch
new file mode 100644
index 0000000..7e95b0a
--- /dev/null
+++ b/recipes/binutils/binutils-2.18/binutils-section-in-segment.patch
@@ -0,0 +1,30 @@
+2007-11-28  Nathan Sidwell  <nathan at codesourcery.com>
+
+	Issue #2297
+	include/elf/
+	* internal.h (ELF_IS_SECTION_IN_SEGMENT): Adjust to cope with
+	segments at the end of memory.
+
+Index: include/elf/internal.h
+===================================================================
+--- include/elf/internal.h	(revision 187336)
++++ include/elf/internal.h	(working copy)
+@@ -280,11 +280,12 @@ struct elf_segment_map
+        || ((bfd_vma) sec_hdr->sh_offset >= segment->p_offset		\
+ 	   && (sec_hdr->sh_offset + ELF_SECTION_SIZE(sec_hdr, segment)	\
+ 	       <= segment->p_offset + segment->p_filesz)))		\
+-   /* SHF_ALLOC sections must have VMAs within the segment.  */		\
++   /* SHF_ALLOC sections must have VMAs within the segment.  Be		\
++      careful about segments right at the end of memory.  */		\
+    && ((sec_hdr->sh_flags & SHF_ALLOC) == 0				\
+        || (sec_hdr->sh_addr >= segment->p_vaddr				\
+-	   && (sec_hdr->sh_addr + ELF_SECTION_SIZE(sec_hdr, segment)	\
+-	       <= segment->p_vaddr + segment->p_memsz))))
++	   && (sec_hdr->sh_addr - segment->p_vaddr			\
++	       + ELF_SECTION_SIZE(sec_hdr, segment) <= segment->p_memsz))))
+ 
+ /* Decide if the given sec_hdr is in the given segment in file.  */
+ #define ELF_IS_SECTION_IN_SEGMENT_FILE(sec_hdr, segment)	\
+
+--------------040206010003050401040204--
+
diff --git a/recipes/binutils/binutils_2.18.bb b/recipes/binutils/binutils_2.18.bb
index 8721464..159d97f 100644
--- a/recipes/binutils/binutils_2.18.bb
+++ b/recipes/binutils/binutils_2.18.bb
@@ -1,4 +1,4 @@
-INC_PR = "r6"
+INC_PR = "r7"
 PR = "${INC_PR}.1"
 
 require binutils.inc
@@ -15,6 +15,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-x86_64_i386_biarch.patch;patch=1 \
+     file://binutils-section-in-segment.patch;patch=1;pnum=0 \
      "
 
 # powerpc patches





More information about the Openembedded-commits mailing list