diff options
Diffstat (limited to 'dev-libs/elfutils')
-rw-r--r-- | dev-libs/elfutils/ChangeLog | 9 | ||||
-rw-r--r-- | dev-libs/elfutils/elfutils-0.118.ebuild | 5 | ||||
-rw-r--r-- | dev-libs/elfutils/files/elfutils-0.118-no-nested-functions.patch | 59 |
3 files changed, 69 insertions, 4 deletions
diff --git a/dev-libs/elfutils/ChangeLog b/dev-libs/elfutils/ChangeLog index eb42c340e15d..91822f18e21c 100644 --- a/dev-libs/elfutils/ChangeLog +++ b/dev-libs/elfutils/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-libs/elfutils -# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/elfutils/ChangeLog,v 1.72 2005/12/19 22:57:25 vapier Exp $ +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/elfutils/ChangeLog,v 1.73 2006/01/06 01:04:49 vapier Exp $ + + 06 Jan 2006; Mike Frysinger <vapier@gentoo.org> + +files/elfutils-0.118-no-nested-functions.patch, elfutils-0.118.ebuild: + Add a hack so eu-nm is not generated with an executable stack #116968 by + Benno Schulenberg. 19 Dec 2005; Mike Frysinger <vapier@gentoo.org> +files/elfutils-0.118-libelf-link.patch, elfutils-0.118.ebuild: diff --git a/dev-libs/elfutils/elfutils-0.118.ebuild b/dev-libs/elfutils/elfutils-0.118.ebuild index 4e4d572493ab..555d521b1e96 100644 --- a/dev-libs/elfutils/elfutils-0.118.ebuild +++ b/dev-libs/elfutils/elfutils-0.118.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/elfutils/elfutils-0.118.ebuild,v 1.4 2005/12/19 22:57:25 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/elfutils/elfutils-0.118.ebuild,v 1.5 2006/01/06 01:04:49 vapier Exp $ inherit eutils @@ -35,6 +35,7 @@ src_unpack() { epatch "${WORKDIR}"/patch/ epatch "${FILESDIR}"/${P}-libelf-link.patch epatch "${FILESDIR}"/${P}-PaX-support.patch + epatch "${FILESDIR}"/${P}-no-nested-functions.patch #116968 # Needed by ${P}-portability.patch autoreconf || die diff --git a/dev-libs/elfutils/files/elfutils-0.118-no-nested-functions.patch b/dev-libs/elfutils/files/elfutils-0.118-no-nested-functions.patch new file mode 100644 index 000000000000..f89158b1a1b3 --- /dev/null +++ b/dev-libs/elfutils/files/elfutils-0.118-no-nested-functions.patch @@ -0,0 +1,59 @@ +Using nested functions causes gcc to generate trampolines which +requires an executable stack. + +http://bugs.gentoo.org/116968 + +--- elfutils/src/nm.c ++++ elfutils/src/nm.c +@@ -926,23 +926,22 @@ + /* Maximum size of memory we allocate on the stack. */ + #define MAX_STACK_ALLOC 65536 + +-static void +-show_symbols (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, Elf_Scn *xndxscn, +- GElf_Shdr *shdr, const char *prefix, const char *fname, +- const char *fullname) +-{ ++/* hack to avoid nested functions -> executable stack */ ++static Ebl *_show_symbols_ebl; ++static GElf_Shdr *_show_symbols_shdr; ++static + int sort_by_name (const void *p1, const void *p2) + { + GElf_SymX *s1 = (GElf_SymX *) p1; + GElf_SymX *s2 = (GElf_SymX *) p2; + int result; + +- result = strcmp (elf_strptr (ebl->elf, shdr->sh_link, s1->sym.st_name), +- elf_strptr (ebl->elf, shdr->sh_link, s2->sym.st_name)); ++ result = strcmp (elf_strptr (_show_symbols_ebl->elf, _show_symbols_shdr->sh_link, s1->sym.st_name), ++ elf_strptr (_show_symbols_ebl->elf, _show_symbols_shdr->sh_link, s2->sym.st_name)); + + return reverse_sort ? -result : result; + } +- ++static + int sort_by_address (const void *p1, const void *p2) + { + GElf_SymX *s1 = (GElf_SymX *) p1; +@@ -954,6 +953,11 @@ + return reverse_sort ? -result : result; + } + ++static void ++show_symbols (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, Elf_Scn *xndxscn, ++ GElf_Shdr *shdr, const char *prefix, const char *fname, ++ const char *fullname) ++{ + /* Get the section header string table index. */ + size_t shstrndx; + if (elf_getshstrndx (ebl->elf, &shstrndx) < 0) +@@ -1129,6 +1133,8 @@ + nentries = nentries_used; + + /* Sort the entries according to the users wishes. */ ++ _show_symbols_ebl = ebl; ++ _show_symbols_shdr = shdr; + if (sort == sort_name) + qsort (sym_mem, nentries, sizeof (GElf_SymX), sort_by_name); + else if (sort == sort_numeric) |