summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-11-21 03:53:05 +0000
committerMike Frysinger <vapier@gentoo.org>2009-11-21 03:53:05 +0000
commit0cef24cb46620cc90b240d764454d3db746d150a (patch)
treef2d9d86b2857b3ebf8b708a4ac948d0d0afcc559 /dev-libs/elfutils
parentAdd notes about how to make the tarball from the rpm source. (diff)
downloadgentoo-2-0cef24cb46620cc90b240d764454d3db746d150a.tar.gz
gentoo-2-0cef24cb46620cc90b240d764454d3db746d150a.tar.bz2
gentoo-2-0cef24cb46620cc90b240d764454d3db746d150a.zip
Add fix by Lubomir Rintel for corrupting some object files #288977 by Hugo Mildenberger.
(Portage version: 2.2_rc49/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/elfutils')
-rw-r--r--dev-libs/elfutils/ChangeLog10
-rw-r--r--dev-libs/elfutils/elfutils-0.143-r1.ebuild61
-rw-r--r--dev-libs/elfutils/files/elfutils-0.143-fix-fill_mmap-for-sections-past-the-section-headers.patch34
3 files changed, 104 insertions, 1 deletions
diff --git a/dev-libs/elfutils/ChangeLog b/dev-libs/elfutils/ChangeLog
index 4562b72d8113..e5659f27f09c 100644
--- a/dev-libs/elfutils/ChangeLog
+++ b/dev-libs/elfutils/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-libs/elfutils
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/elfutils/ChangeLog,v 1.125 2009/09/26 21:53:40 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/elfutils/ChangeLog,v 1.126 2009/11/21 03:53:04 vapier Exp $
+
+*elfutils-0.143-r1 (21 Nov 2009)
+
+ 21 Nov 2009; Mike Frysinger <vapier@gentoo.org> +elfutils-0.143-r1.ebuild,
+ +files/elfutils-0.143-fix-fill_mmap-for-sections-past-the-section-headers.
+ patch:
+ Add fix by Lubomir Rintel for corrupting some object files #288977 by Hugo
+ Mildenberger.
*elfutils-0.143 (26 Sep 2009)
diff --git a/dev-libs/elfutils/elfutils-0.143-r1.ebuild b/dev-libs/elfutils/elfutils-0.143-r1.ebuild
new file mode 100644
index 000000000000..4b0331de099c
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.143-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/elfutils/elfutils-0.143-r1.ebuild,v 1.1 2009/11/21 03:53:04 vapier Exp $
+
+inherit eutils
+
+DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
+HOMEPAGE="http://people.redhat.com/drepper/"
+#SRC_URI="ftp://sources.redhat.com/pub/systemtap/${PN}/${P}.tar.gz"
+#SRC_URI="mirror://debian/pool/main/e/elfutils/elfutils_${PV}.orig.tar.gz"
+SRC_URI="https://fedorahosted.org/releases/e/l/elfutils/${P}.tar.bz2"
+
+LICENSE="GPL-2-with-exceptions"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="bzip2 lzma nls test zlib"
+
+# This pkg does not actually seem to compile currently in a uClibc
+# environment (xrealloc errs), but we need to ensure that glibc never
+# gets pulled in as a dep since this package does not respect virtual/libc
+RDEPEND="zlib? ( >=sys-libs/zlib-1.2.2.3 )
+ bzip2? ( app-arch/bzip2 )
+ lzma? ( app-arch/xz-utils )"
+DEPEND="${RDEPEND}
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )
+ nls? ( sys-devel/gettext )
+ >=sys-devel/flex-2.5.4a
+ sys-devel/m4
+ >=sys-devel/binutils-2.15.90.0.1
+ >=sys-devel/gcc-4.1.2
+ !dev-libs/libelf"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
+ epatch "${FILESDIR}"/${P}-fix-fill_mmap-for-sections-past-the-section-headers.patch #288977
+ find . -name Makefile.in -print0 | xargs -0 sed -i -e 's:-W\(error\|extra\)::g'
+ use test || sed -i -e 's: tests::' Makefile.in #226349
+}
+
+src_compile() {
+ econf \
+ $(use_enable nls) \
+ --program-prefix="eu-" \
+ $(use_with zlib) \
+ $(use_with bzip2 bzlib) \
+ $(use_with lzma)
+
+ emake || die
+}
+
+src_test() {
+ env LD_LIBRARY_PATH="${S}/libelf:${S}/libebl:${S}/libdw:${S}/libasm" \
+ emake -j1 check || die "test failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS NOTES README THANKS TODO
+}
diff --git a/dev-libs/elfutils/files/elfutils-0.143-fix-fill_mmap-for-sections-past-the-section-headers.patch b/dev-libs/elfutils/files/elfutils-0.143-fix-fill_mmap-for-sections-past-the-section-headers.patch
new file mode 100644
index 000000000000..2d613985e4fe
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.143-fix-fill_mmap-for-sections-past-the-section-headers.patch
@@ -0,0 +1,34 @@
+http://bugs.gentoo.org/288977
+
+From 59869a0ec5f8f8bfcaea12fecd17053e3f2b1764 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Fri, 23 Oct 2009 16:18:51 +0200
+Subject: [PATCH] Fix fill_mmap for sections past the section headers
+
+If fill_mmap() was run for a section that's past the shdr_end, but does
+not immediately follow the section headers the fill start would be
+determined incorrectly as shdr_end, which would wipe off contents of
+sections between shdr_end and current one.
+
+Issue was reported and triaged by Hugo Mildenberger and Peter Alfredsen.
+---
+ libelf/ChangeLog | 5 +++++
+ libelf/elf32_updatefile.c | 7 +++++--
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+--- a/libelf/elf32_updatefile.c 2009-10-23 21:33:06.000000000 +0200
++++ b/libelf/elf32_updatefile.c 2009-10-23 21:39:38.000000000 +0200
+@@ -322,8 +322,11 @@
+
+ if (last_position + written != scn_start + offset
+ && shdr_end < scn_start + offset)
+- memset (shdr_end, __libelf_fill_byte,
+- scn_start + offset - shdr_end);
++ {
++ char *fill_start = MAX (shdr_end, scn_start);
++ memset (fill_start, __libelf_fill_byte,
++ scn_start + offset - fill_start);
++ }
+ }
+
+ if (scn->data_list_rear != NULL)