packages: elfutils/elfutils.spec, elfutils/elfutils-upstream.patch (NEW)=?UTF-8?Q?=20?=-=?UTF-8?Q?=20?=...

pluto pluto at pld-linux.org
Sun May 6 10:50:31 CEST 2012


Author: pluto                        Date: Sun May  6 08:50:31 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- small upstream fixes for elflint bug (http://sourceware.org/bugzilla/show_bug.cgi?id=12945).

---- Files affected:
packages/elfutils:
   elfutils.spec (1.101 -> 1.102) , elfutils-upstream.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/elfutils/elfutils.spec
diff -u packages/elfutils/elfutils.spec:1.101 packages/elfutils/elfutils.spec:1.102
--- packages/elfutils/elfutils.spec:1.101	Sun May  6 10:36:10 2012
+++ packages/elfutils/elfutils.spec	Sun May  6 10:50:26 2012
@@ -22,6 +22,7 @@
 Patch7:		%{name}-inline.patch
 Patch8:		%{name}-scanf.patch
 Patch9:		%{name}-strings_c.patch
+Patch10:	%{name}-upstream.patch
 URL:		https://fedorahosted.org/elfutils/
 BuildRequires:	autoconf >= 2.59
 BuildRequires:	automake >= 1:1.7
@@ -145,6 +146,7 @@
 %patch7 -p1
 %patch8 -p1
 %patch9 -p0
+%patch10 -p1
 
 %{__rm} po/stamp-po
 
@@ -240,6 +242,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.102  2012/05/06 08:50:26  pluto
+- small upstream fixes for elflint bug (http://sourceware.org/bugzilla/show_bug.cgi?id=12945).
+
 Revision 1.101  2012/05/06 08:36:10  pluto
 - updated to 0.153.
   disabled -Werror (some unused-but-set-variable failures).

================================================================
Index: packages/elfutils/elfutils-upstream.patch
diff -u /dev/null packages/elfutils/elfutils-upstream.patch:1.1
--- /dev/null	Sun May  6 10:50:31 2012
+++ packages/elfutils/elfutils-upstream.patch	Sun May  6 10:50:26 2012
@@ -0,0 +1,45 @@
+commit 738c18312e0db36dce5e1cd2cddaf66eb8947f1a
+Author: Roland McGrath <roland at hack.frob.com>
+Date:   Wed Mar 28 15:01:49 2012 -0700
+
+    elflint: Accept SHF_INFO_LINK for reloc sections.
+
+commit 191d1f0b9163593eee8c4f5cbe3e95cabf6ae9a9
+Author: Mark Wielaard <mjw at redhat.com>
+Date:   Mon Apr 2 17:11:25 2012 +0200
+
+    elf32_offscn.c: Do not match SHT_NOBITS sections at OFFSET.
+    
+    readelf -d doesn't work if a SHT_NOBITS section is right before the actual
+    .dynamic section at the same offset. elflint also fails on such binaries.
+    So skip SHT_NOBITS sections at the same offset in [g]elf[32|64]_offscn().
+
+diff --git a/src/elflint.c b/src/elflint.c
+index abca8b7..a03caac 100644
+--- a/src/elflint.c
++++ b/src/elflint.c
+@@ -3357,8 +3357,8 @@ static const struct
+     { ".note", 6, SHT_NOTE, atleast, 0, SHF_ALLOC },
+     { ".plt", 5, SHT_PROGBITS, unused, 0, 0 }, // XXX more tests
+     { ".preinit_array", 15, SHT_PREINIT_ARRAY, exact, SHF_ALLOC | SHF_WRITE, 0 },
+-    { ".rela", 5, SHT_RELA, atleast, 0, SHF_ALLOC }, // XXX more tests
+-    { ".rel", 4, SHT_REL, atleast, 0, SHF_ALLOC }, // XXX more tests
++    { ".rela", 5, SHT_RELA, atleast, 0, SHF_ALLOC | SHF_INFO_LINK }, // XXX more tests
++    { ".rel", 4, SHT_REL, atleast, 0, SHF_ALLOC | SHF_INFO_LINK }, // XXX more tests
+     { ".rodata", 8, SHT_PROGBITS, atleast, SHF_ALLOC, SHF_MERGE | SHF_STRINGS },
+     { ".rodata1", 9, SHT_PROGBITS, atleast, SHF_ALLOC, SHF_MERGE | SHF_STRINGS },
+     { ".shstrtab", 10, SHT_STRTAB, exact, 0, 0 },
+diff --git a/libelf/elf32_offscn.c b/libelf/elf32_offscn.c
+index 86eff8b..5dcfc4a 100644
+--- a/libelf/elf32_offscn.c
++++ b/libelf/elf32_offscn.c
+@@ -101,7 +101,8 @@ elfw2(LIBELFBITS,offscn) (elf, offset)
+ 	    /* If this section is empty, the following one has the same
+ 	       sh_offset.  We presume the caller is looking for a nonempty
+ 	       section, so keep looking if this one is empty.  */
+-	    if (runp->data[i].shdr.ELFW(e,LIBELFBITS)->sh_size != 0)
++	    if (runp->data[i].shdr.ELFW(e,LIBELFBITS)->sh_size != 0
++		&& runp->data[i].shdr.ELFW(e,LIBELFBITS)->sh_type != SHT_NOBITS)
+ 	      goto out;
+ 	  }
+ 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/elfutils/elfutils.spec?r1=1.101&r2=1.102



More information about the pld-cvs-commit mailing list