Update to 0.144

This commit is contained in:
roland 2010-01-15 04:04:34 +00:00
parent 5f896cd010
commit e37a49c838
7 changed files with 180 additions and 123 deletions

View File

@ -1 +1 @@
elfutils-0.143.tar.bz2 elfutils-0.144.tar.bz2

Binary file not shown.

BIN
elfutils-0.144.tar.bz2.sig Normal file

Binary file not shown.

View File

@ -1,6 +1,6 @@
--- elfutils/backends/ChangeLog --- elfutils/backends/ChangeLog
+++ elfutils/backends/ChangeLog +++ elfutils/backends/ChangeLog
@@ -57,6 +57,10 @@ @@ -78,6 +78,10 @@
* ppc_attrs.c (ppc_check_object_attribute): Handle tag * ppc_attrs.c (ppc_check_object_attribute): Handle tag
GNU_Power_ABI_Struct_Return. GNU_Power_ABI_Struct_Return.
@ -11,7 +11,7 @@
2008-10-04 Ulrich Drepper <drepper@redhat.com> 2008-10-04 Ulrich Drepper <drepper@redhat.com>
* i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
@@ -384,6 +388,11 @@ @@ -405,6 +409,11 @@
* sparc_init.c: Likewise. * sparc_init.c: Likewise.
* x86_64_init.c: Likewise. * x86_64_init.c: Likewise.
@ -23,7 +23,7 @@
2005-11-19 Roland McGrath <roland@redhat.com> 2005-11-19 Roland McGrath <roland@redhat.com>
* ppc64_reloc.def: REL30 -> ADDR30. * ppc64_reloc.def: REL30 -> ADDR30.
@@ -406,6 +415,9 @@ @@ -427,6 +436,9 @@
* Makefile.am (uninstall): Don't try to remove $(pkgincludedir). * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
(CLEANFILES): Add libebl_$(m).so. (CLEANFILES): Add libebl_$(m).so.
@ -101,7 +101,15 @@
# XXX Should not be needed... # XXX Should not be needed...
--- elfutils/ChangeLog --- elfutils/ChangeLog
+++ elfutils/ChangeLog +++ elfutils/ChangeLog
@@ -6,6 +6,10 @@ @@ -1,3 +1,7 @@
+2009-11-22 Roland McGrath <roland@redhat.com>
+
+ * configure.ac: Use sed and expr instead of modern bash extensions.
+
2009-09-21 Ulrich Drepper <drepper@redhat.com>
* configure.ac: Update for more modern autoconf.
@@ -6,6 +10,10 @@
* configure.ac (zip_LIBS): Check for liblzma too. * configure.ac (zip_LIBS): Check for liblzma too.
@ -112,7 +120,7 @@
2009-04-19 Roland McGrath <roland@redhat.com> 2009-04-19 Roland McGrath <roland@redhat.com>
* configure.ac (eu_version): Round down here, not in version.h macros. * configure.ac (eu_version): Round down here, not in version.h macros.
@@ -17,6 +21,8 @@ @@ -17,6 +25,8 @@
2009-01-23 Roland McGrath <roland@redhat.com> 2009-01-23 Roland McGrath <roland@redhat.com>
@ -121,7 +129,7 @@
* configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3. * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
* configure.ac (__thread check): Use AC_LINK_IFELSE, in case of * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
@@ -97,6 +103,10 @@ @@ -97,6 +107,10 @@
* configure.ac: Add dummy automake conditional to get dependencies * configure.ac: Add dummy automake conditional to get dependencies
for non-generic linker right. See src/Makefile.am. for non-generic linker right. See src/Makefile.am.
@ -132,7 +140,7 @@
2005-11-18 Roland McGrath <roland@redhat.com> 2005-11-18 Roland McGrath <roland@redhat.com>
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable. * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
@@ -144,6 +154,17 @@ @@ -144,6 +158,17 @@
* Makefile.am (all_SUBDIRS): Add libdwfl. * Makefile.am (all_SUBDIRS): Add libdwfl.
* configure.ac: Write libdwfl/Makefile. * configure.ac: Write libdwfl/Makefile.
@ -425,6 +433,24 @@
fi fi
@@ -5460,7 +5670,7 @@ ac_config_files="$ac_config_files versio
# 1.234<whatever> -> 1234<whatever>
case "$PACKAGE_VERSION" in
-[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;;
+[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
*) { { $as_echo "$as_me:$LINENO: error: confused by version number '$PACKAGE_VERSION'" >&5
$as_echo "$as_me: error: confused by version number '$PACKAGE_VERSION'" >&2;}
{ (exit 1); exit 1; }; } ;;
@@ -5495,7 +5705,7 @@ $as_echo "$as_me: error: confused by ver
esac
# Round up to the next release API (x.y) version.
-eu_version=$[($eu_version + 999) / 1000]
+eu_version=`expr \( $eu_version + 999 \) / 1000`
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
--- elfutils/configure.ac --- elfutils/configure.ac
+++ elfutils/configure.ac +++ elfutils/configure.ac
@@ -73,6 +73,54 @@ CFLAGS="$old_CFLAGS"]) @@ -73,6 +73,54 @@ CFLAGS="$old_CFLAGS"])
@ -494,6 +520,23 @@
LOCALEDIR=$datadir LOCALEDIR=$datadir
AC_SUBST(LOCALEDIR) AC_SUBST(LOCALEDIR)
@@ -259,7 +310,7 @@ AC_SUBST([eu_version])
# 1.234<whatever> -> 1234<whatever>
case "$PACKAGE_VERSION" in
-[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;;
+[[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
*) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
esac
case "$eu_version" in
@@ -288,6 +339,6 @@ case "$eu_version" in
esac
# Round up to the next release API (x.y) version.
-[eu_version=$[($eu_version + 999) / 1000]]
+eu_version=`expr \( $eu_version + 999 \) / 1000`
AC_OUTPUT
--- elfutils/lib/ChangeLog --- elfutils/lib/ChangeLog
+++ elfutils/lib/ChangeLog +++ elfutils/lib/ChangeLog
@@ -4,6 +4,9 @@ @@ -4,6 +4,9 @@
@ -728,7 +771,7 @@
@MUDFLAP_TRUE@ $($(*F)_no_Werror),,-Werror) @MUDFLAP_TRUE@ $($(*F)_no_Werror),,-Werror)
--- elfutils/libdw/ChangeLog --- elfutils/libdw/ChangeLog
+++ elfutils/libdw/ChangeLog +++ elfutils/libdw/ChangeLog
@@ -20,6 +20,10 @@ @@ -49,6 +49,10 @@
* dwarf_hasattr_integrate.c: Integrate DW_AT_specification too. * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
@ -739,7 +782,7 @@
2009-08-10 Roland McGrath <roland@redhat.com> 2009-08-10 Roland McGrath <roland@redhat.com>
* dwarf_getscopevar.c: Use dwarf_diename. * dwarf_getscopevar.c: Use dwarf_diename.
@@ -788,6 +792,11 @@ @@ -817,6 +821,11 @@
2005-05-31 Roland McGrath <roland@redhat.com> 2005-05-31 Roland McGrath <roland@redhat.com>
@ -753,7 +796,7 @@
--- elfutils/libdw/libdw.h --- elfutils/libdw/libdw.h
+++ elfutils/libdw/libdw.h +++ elfutils/libdw/libdw.h
@@ -809,7 +809,7 @@ extern Dwarf_OOM dwarf_new_oom_handler ( @@ -814,7 +814,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (
/* Inline optimizations. */ /* Inline optimizations. */
@ -783,7 +826,7 @@
--- elfutils/libdw/Makefile.in --- elfutils/libdw/Makefile.in
+++ elfutils/libdw/Makefile.in +++ elfutils/libdw/Makefile.in
@@ -186,6 +186,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -187,6 +187,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
@ -791,7 +834,7 @@
LEX = @LEX@ LEX = @LEX@
LEXLIB = @LEXLIB@ LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
@@ -215,6 +216,7 @@ SHELL = @SHELL@ @@ -216,6 +217,7 @@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VERSION = 1 VERSION = 1
@ -799,7 +842,7 @@
XGETTEXT = @XGETTEXT@ XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_015 = @XGETTEXT_015@
YACC = @YACC@ YACC = @YACC@
@@ -273,9 +275,10 @@ top_builddir = @top_builddir@ @@ -274,9 +276,10 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
zip_LIBS = @zip_LIBS@ zip_LIBS = @zip_LIBS@
@MUDFLAP_FALSE@AM_CFLAGS = $(am__append_1) -Wall -Werror -Wshadow \ @MUDFLAP_FALSE@AM_CFLAGS = $(am__append_1) -Wall -Werror -Wshadow \
@ -814,7 +857,7 @@
$(COMPILE))) $(COMPILE)))
--- elfutils/libdwfl/ChangeLog --- elfutils/libdwfl/ChangeLog
+++ elfutils/libdwfl/ChangeLog +++ elfutils/libdwfl/ChangeLog
@@ -1139,6 +1139,11 @@ @@ -1165,6 +1165,11 @@
2005-07-21 Roland McGrath <roland@redhat.com> 2005-07-21 Roland McGrath <roland@redhat.com>
@ -875,7 +918,7 @@
--- elfutils/libebl/ChangeLog --- elfutils/libebl/ChangeLog
+++ elfutils/libebl/ChangeLog +++ elfutils/libebl/ChangeLog
@@ -603,6 +603,11 @@ @@ -620,6 +620,11 @@
* Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
tracking works right. tracking works right.
@ -936,7 +979,7 @@
--- elfutils/libelf/ChangeLog --- elfutils/libelf/ChangeLog
+++ elfutils/libelf/ChangeLog +++ elfutils/libelf/ChangeLog
@@ -580,6 +580,11 @@ @@ -614,6 +614,11 @@
* elf.h: Update from glibc. * elf.h: Update from glibc.
@ -1071,7 +1114,7 @@
/* It was symbol+offset. */ /* It was symbol+offset. */
--- elfutils/src/ChangeLog --- elfutils/src/ChangeLog
+++ elfutils/src/ChangeLog +++ elfutils/src/ChangeLog
@@ -7,8 +7,16 @@ @@ -59,8 +59,16 @@
* readelf.c (attr_callback): Use print_block only when we don't use * readelf.c (attr_callback): Use print_block only when we don't use
print_ops. print_ops.
@ -1088,7 +1131,7 @@
* ar.c (do_oper_extract): Use pathconf instead of statfs. * ar.c (do_oper_extract): Use pathconf instead of statfs.
2009-08-01 Ulrich Drepper <drepper@redhat.com> 2009-08-01 Ulrich Drepper <drepper@redhat.com>
@@ -172,6 +180,8 @@ @@ -224,6 +232,8 @@
* readelf.c (print_debug_frame_section): Use t instead of j formats * readelf.c (print_debug_frame_section): Use t instead of j formats
for ptrdiff_t OFFSET. for ptrdiff_t OFFSET.
@ -1097,7 +1140,7 @@
2009-01-21 Ulrich Drepper <drepper@redhat.com> 2009-01-21 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_program_header): Fix typo in .eh_frame_hdr section * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
@@ -355,6 +365,11 @@ @@ -407,6 +417,11 @@
that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
is valid in RELRO. is valid in RELRO.
@ -1109,7 +1152,7 @@
2008-02-29 Roland McGrath <roland@redhat.com> 2008-02-29 Roland McGrath <roland@redhat.com>
* readelf.c (print_attributes): Add a cast. * readelf.c (print_attributes): Add a cast.
@@ -606,6 +621,8 @@ @@ -658,6 +673,8 @@
* readelf.c (hex_dump): Fix rounding error in whitespace calculation. * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
@ -1118,7 +1161,7 @@
2007-10-15 Roland McGrath <roland@redhat.com> 2007-10-15 Roland McGrath <roland@redhat.com>
* make-debug-archive.in: New file. * make-debug-archive.in: New file.
@@ -1045,6 +1062,10 @@ @@ -1097,6 +1114,10 @@
* elflint.c (valid_e_machine): Add EM_ALPHA. * elflint.c (valid_e_machine): Add EM_ALPHA.
Reported by Christian Aichinger <Greek0@gmx.net>. Reported by Christian Aichinger <Greek0@gmx.net>.
@ -1129,7 +1172,7 @@
2006-08-08 Ulrich Drepper <drepper@redhat.com> 2006-08-08 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB. * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
@@ -1121,6 +1142,10 @@ @@ -1173,6 +1194,10 @@
* Makefile.am: Add hacks to create dependency files for non-generic * Makefile.am: Add hacks to create dependency files for non-generic
linker. linker.
@ -1140,7 +1183,7 @@
2006-06-12 Ulrich Drepper <drepper@redhat.com> 2006-06-12 Ulrich Drepper <drepper@redhat.com>
* ldgeneric.c (ld_generic_generate_sections): Don't create .interp * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
@@ -1469,6 +1494,11 @@ @@ -1521,6 +1546,11 @@
* readelf.c (print_debug_loc_section): Fix indentation for larger * readelf.c (print_debug_loc_section): Fix indentation for larger
address size. address size.
@ -1259,7 +1302,7 @@
size_LDADD = $(libelf) $(libeu) $(libmudflap) size_LDADD = $(libelf) $(libeu) $(libmudflap)
--- elfutils/src/readelf.c --- elfutils/src/readelf.c
+++ elfutils/src/readelf.c +++ elfutils/src/readelf.c
@@ -7594,7 +7594,7 @@ dump_archive_index (Elf *elf, const char @@ -7661,7 +7661,7 @@ dump_archive_index (Elf *elf, const char
if (unlikely (elf_rand (elf, as_off) == 0) if (unlikely (elf_rand (elf, as_off) == 0)
|| unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf)) || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
== NULL)) == NULL))

View File

@ -1,6 +1,6 @@
--- elfutils/libelf/ChangeLog --- elfutils/libelf/ChangeLog
+++ elfutils/libelf/ChangeLog +++ elfutils/libelf/ChangeLog
@@ -572,6 +572,49 @@ @@ -606,6 +606,49 @@
If section content hasn't been read yet, do it before looking for the If section content hasn't been read yet, do it before looking for the
block size. If no section data present, infer size of section header. block size. If no section data present, infer size of section header.
@ -52,14 +52,7 @@
* elf.h: Update again. * elf.h: Update again.
--- elfutils/libelf/elf32_getphdr.c --- elfutils/libelf/elf32_getphdr.c
+++ elfutils/libelf/elf32_getphdr.c +++ elfutils/libelf/elf32_getphdr.c
@@ -1,5 +1,5 @@ @@ -107,6 +107,16 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf)
/* Get ELF program header table.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Red Hat, Inc.
+ Copyright (C) 1998-2009 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -105,6 +105,16 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf)
if (elf->map_address != NULL) if (elf->map_address != NULL)
{ {
@ -114,8 +107,8 @@
/* All the data is already mapped. If we could use it /* All the data is already mapped. If we could use it
--- elfutils/libelf/elf32_newphdr.c --- elfutils/libelf/elf32_newphdr.c
+++ elfutils/libelf/elf32_newphdr.c +++ elfutils/libelf/elf32_newphdr.c
@@ -124,6 +124,12 @@ elfw2(LIBELFBITS,newphdr) (elf, count) @@ -135,6 +135,12 @@ elfw2(LIBELFBITS,newphdr) (elf, count)
else if (elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phnum != count || count == PN_XNUM
|| elf->state.ELFW(elf,LIBELFBITS).phdr == NULL) || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL)
{ {
+ if (unlikely (count > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr)))) + if (unlikely (count > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr))))
@ -129,7 +122,7 @@
result = (ElfW2(LIBELFBITS,Phdr) *) result = (ElfW2(LIBELFBITS,Phdr) *)
--- elfutils/libelf/elf32_updatefile.c --- elfutils/libelf/elf32_updatefile.c
+++ elfutils/libelf/elf32_updatefile.c +++ elfutils/libelf/elf32_updatefile.c
@@ -220,6 +220,9 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf @@ -223,6 +223,9 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf
/* Write all the sections. Well, only those which are modified. */ /* Write all the sections. Well, only those which are modified. */
if (shnum > 0) if (shnum > 0)
{ {
@ -139,7 +132,7 @@
Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns; Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns;
Elf_Scn **scns = (Elf_Scn **) alloca (shnum * sizeof (Elf_Scn *)); Elf_Scn **scns = (Elf_Scn **) alloca (shnum * sizeof (Elf_Scn *));
char *const shdr_start = ((char *) elf->map_address + elf->start_offset char *const shdr_start = ((char *) elf->map_address + elf->start_offset
@@ -636,6 +639,10 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf @@ -645,6 +648,10 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf
/* Write all the sections. Well, only those which are modified. */ /* Write all the sections. Well, only those which are modified. */
if (shnum > 0) if (shnum > 0)
{ {
@ -152,13 +145,6 @@
xfct_t shdr_fctp = __elf_xfctstom[__libelf_version - 1][EV_CURRENT - 1][ELFW(ELFCLASS, LIBELFBITS) - 1][ELF_T_SHDR]; xfct_t shdr_fctp = __elf_xfctstom[__libelf_version - 1][EV_CURRENT - 1][ELFW(ELFCLASS, LIBELFBITS) - 1][ELF_T_SHDR];
--- elfutils/libelf/elf_begin.c --- elfutils/libelf/elf_begin.c
+++ elfutils/libelf/elf_begin.c +++ elfutils/libelf/elf_begin.c
@@ -1,5 +1,5 @@
/* Create descriptor for processing file.
- Copyright (C) 1998-2005, 2006, 2007, 2008 Red Hat, Inc.
+ Copyright (C) 1998-2009 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -165,7 +165,8 @@ get_shnum (void *map_address, unsigned c @@ -165,7 +165,8 @@ get_shnum (void *map_address, unsigned c
if (unlikely (result == 0) && ehdr.e32->e_shoff != 0) if (unlikely (result == 0) && ehdr.e32->e_shoff != 0)
@ -192,10 +178,10 @@
+ else if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf64_Shdr))) + else if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf64_Shdr)))
+ return NULL; + return NULL;
+ +
/* We can now allocate the memory. */ /* We can now allocate the memory. Even if there are no section headers,
Elf *elf = allocate_elf (fildes, map_address, offset, maxsize, cmd, parent, we allocate space for a zeroth section in case we need it later. */
ELF_K_ELF, scncnt * sizeof (Elf_Scn)); const size_t scnmax = (scncnt ?: (cmd == ELF_C_RDWR || cmd == ELF_C_RDWR_MMAP)
@@ -318,13 +329,30 @@ file_read_elf (int fildes, void *map_add @@ -324,13 +335,33 @@ file_read_elf (int fildes, void *map_add
{ {
/* We can use the mmapped memory. */ /* We can use the mmapped memory. */
elf->state.elf32.ehdr = ehdr; elf->state.elf32.ehdr = ehdr;
@ -211,22 +197,30 @@
+ } + }
elf->state.elf32.shdr elf->state.elf32.shdr
= (Elf32_Shdr *) ((char *) ehdr + ehdr->e_shoff); = (Elf32_Shdr *) ((char *) ehdr + ehdr->e_shoff);
- if (ehdr->e_phnum > 0)
- /* Assign a value only if there really is a program
- header. Otherwise the value remains NULL. */
- elf->state.elf32.phdr
- = (Elf32_Phdr *) ((char *) ehdr + ehdr->e_phoff);
+ +
if (ehdr->e_phnum > 0) + size_t phnum = ehdr->e_phnum;
+ if (phnum == PN_XNUM && scncnt > 0)
+ phnum = elf->state.elf32.shdr[0].sh_info;
+ if (phnum > 0)
+ { + {
/* Assign a value only if there really is a program + /* Assign a value only if there really is a program
header. Otherwise the value remains NULL. */ + header. Otherwise the value remains NULL. */
+ if (unlikely (ehdr->e_phoff >= maxsize) + if (unlikely (ehdr->e_phoff >= maxsize)
+ || unlikely (maxsize - ehdr->e_phoff + || unlikely (maxsize - ehdr->e_phoff
+ < ehdr->e_phnum * sizeof (Elf32_Phdr))) + < phnum * sizeof (Elf32_Phdr)))
+ goto free_and_out; + goto free_and_out;
elf->state.elf32.phdr + elf->state.elf32.phdr
= (Elf32_Phdr *) ((char *) ehdr + ehdr->e_phoff); + = (Elf32_Phdr *) ((char *) ehdr + ehdr->e_phoff);
+ } + }
for (size_t cnt = 0; cnt < scncnt; ++cnt) for (size_t cnt = 0; cnt < scncnt; ++cnt)
{ {
@@ -406,13 +434,26 @@ file_read_elf (int fildes, void *map_add @@ -409,13 +440,28 @@ file_read_elf (int fildes, void *map_add
{ {
/* We can use the mmapped memory. */ /* We can use the mmapped memory. */
elf->state.elf64.ehdr = ehdr; elf->state.elf64.ehdr = ehdr;
@ -237,18 +231,25 @@
+ goto free_and_out; + goto free_and_out;
elf->state.elf64.shdr elf->state.elf64.shdr
= (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff); = (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff);
- if (ehdr->e_phnum > 0)
- /* Assign a value only if there really is a program
- header. Otherwise the value remains NULL. */
- elf->state.elf64.phdr
- = (Elf64_Phdr *) ((char *) ehdr + ehdr->e_phoff);
+ +
if (ehdr->e_phnum > 0) + size_t phnum = ehdr->e_phnum;
+ if (phnum == PN_XNUM && scncnt > 0)
+ phnum = elf->state.elf64.shdr[0].sh_info;
+ if (phnum > 0)
+ { + {
/* Assign a value only if there really is a program + /* Assign a value only if there really is a program
header. Otherwise the value remains NULL. */ + header. Otherwise the value remains NULL. */
+ if (unlikely (ehdr->e_phoff >= maxsize) + if (unlikely (ehdr->e_phoff >= maxsize)
+ || unlikely (ehdr->e_phoff + || unlikely (ehdr->e_phoff
+ + ehdr->e_phnum + + phnum * sizeof (Elf32_Phdr) > maxsize))
+ * sizeof (Elf32_Phdr) > maxsize))
+ goto free_and_out; + goto free_and_out;
elf->state.elf64.phdr + elf->state.elf64.phdr
= (Elf64_Phdr *) ((char *) ehdr + ehdr->e_phoff); + = (Elf64_Phdr *) ((char *) ehdr + ehdr->e_phoff);
+ } + }
for (size_t cnt = 0; cnt < scncnt; ++cnt) for (size_t cnt = 0; cnt < scncnt; ++cnt)
@ -893,7 +894,7 @@
return 0; return 0;
--- elfutils/libelf/libelfP.h --- elfutils/libelf/libelfP.h
+++ elfutils/libelf/libelfP.h +++ elfutils/libelf/libelfP.h
@@ -606,4 +606,8 @@ extern uint32_t __libelf_crc32 (uint32_t @@ -608,4 +608,8 @@ extern uint32_t __libelf_crc32 (uint32_t
/* Align offset to 4 bytes as needed for note name and descriptor data. */ /* Align offset to 4 bytes as needed for note name and descriptor data. */
#define NOTE_ALIGN(n) (((n) + 3) & -4U) #define NOTE_ALIGN(n) (((n) + 3) & -4U)
@ -904,7 +905,7 @@
#endif /* libelfP.h */ #endif /* libelfP.h */
--- elfutils/src/ChangeLog --- elfutils/src/ChangeLog
+++ elfutils/src/ChangeLog +++ elfutils/src/ChangeLog
@@ -1457,6 +1457,16 @@ @@ -1509,6 +1509,16 @@
object symbols or symbols with unknown type. object symbols or symbols with unknown type.
(check_rel): Likewise. (check_rel): Likewise.
@ -921,7 +922,7 @@
2005-06-08 Roland McGrath <roland@redhat.com> 2005-06-08 Roland McGrath <roland@redhat.com>
* readelf.c (print_ops): Add consts. * readelf.c (print_ops): Add consts.
@@ -1502,6 +1512,19 @@ @@ -1554,6 +1564,19 @@
* readelf.c (dwarf_tag_string): Add new tags. * readelf.c (dwarf_tag_string): Add new tags.
@ -943,17 +944,18 @@
* strip.c (handle_elf): Don't translate hash and versym data formats, * strip.c (handle_elf): Don't translate hash and versym data formats,
--- elfutils/src/elflint.c --- elfutils/src/elflint.c
+++ elfutils/src/elflint.c +++ elfutils/src/elflint.c
@@ -130,6 +130,9 @@ static uint32_t shstrndx; @@ -130,6 +130,10 @@ static uint32_t shstrndx;
/* Array to count references in section groups. */ /* Array to count references in section groups. */
static int *scnref; static int *scnref;
+/* Number of sections. */ +/* Numbers of sections and program headers. */
+static unsigned int shnum; +static unsigned int shnum;
+static unsigned int phnum;
+ +
int int
main (int argc, char *argv[]) main (int argc, char *argv[])
@@ -318,10 +321,19 @@ section_name (Ebl *ebl, int idx) @@ -318,10 +322,19 @@ section_name (Ebl *ebl, int idx)
{ {
GElf_Shdr shdr_mem; GElf_Shdr shdr_mem;
GElf_Shdr *shdr; GElf_Shdr *shdr;
@ -974,18 +976,19 @@
} }
@@ -343,10 +355,6 @@ static const int valid_e_machine[] = @@ -343,11 +356,6 @@ static const int valid_e_machine[] =
(sizeof (valid_e_machine) / sizeof (valid_e_machine[0])) (sizeof (valid_e_machine) / sizeof (valid_e_machine[0]))
-/* Number of sections. */ -/* Numbers of sections and program headers. */
-static unsigned int shnum; -static unsigned int shnum;
-static unsigned int phnum;
- -
- -
static void static void
check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size) check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size)
{ {
@@ -612,7 +620,8 @@ section [%2d] '%s': symbol table cannot @@ -631,7 +639,8 @@ section [%2d] '%s': symbol table cannot
} }
} }
@ -995,7 +998,7 @@
ERROR (gettext ("\ ERROR (gettext ("\
section [%2u] '%s': entry size is does not match ElfXX_Sym\n"), section [%2u] '%s': entry size is does not match ElfXX_Sym\n"),
idx, section_name (ebl, idx)); idx, section_name (ebl, idx));
@@ -650,7 +659,7 @@ section [%2d] '%s': XINDEX for zeroth en @@ -669,7 +678,7 @@ section [%2d] '%s': XINDEX for zeroth en
xndxscnidx, section_name (ebl, xndxscnidx)); xndxscnidx, section_name (ebl, xndxscnidx));
} }
@ -1004,7 +1007,7 @@
{ {
sym = gelf_getsymshndx (data, xndxdata, cnt, &sym_mem, &xndx); sym = gelf_getsymshndx (data, xndxdata, cnt, &sym_mem, &xndx);
if (sym == NULL) if (sym == NULL)
@@ -670,7 +679,8 @@ section [%2d] '%s': symbol %zu: invalid @@ -689,7 +698,8 @@ section [%2d] '%s': symbol %zu: invalid
else else
{ {
name = elf_strptr (ebl->elf, shdr->sh_link, sym->st_name); name = elf_strptr (ebl->elf, shdr->sh_link, sym->st_name);
@ -1014,7 +1017,7 @@
} }
if (sym->st_shndx == SHN_XINDEX) if (sym->st_shndx == SHN_XINDEX)
@@ -1018,9 +1028,11 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e @@ -1037,9 +1047,11 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e
{ {
GElf_Shdr rcshdr_mem; GElf_Shdr rcshdr_mem;
const GElf_Shdr *rcshdr = gelf_getshdr (scn, &rcshdr_mem); const GElf_Shdr *rcshdr = gelf_getshdr (scn, &rcshdr_mem);
@ -1028,7 +1031,7 @@
{ {
/* Found the dynamic section. Look through it. */ /* Found the dynamic section. Look through it. */
Elf_Data *d = elf_getdata (scn, NULL); Elf_Data *d = elf_getdata (scn, NULL);
@@ -1030,7 +1042,9 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e @@ -1049,7 +1061,9 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e
{ {
GElf_Dyn dyn_mem; GElf_Dyn dyn_mem;
GElf_Dyn *dyn = gelf_getdyn (d, cnt, &dyn_mem); GElf_Dyn *dyn = gelf_getdyn (d, cnt, &dyn_mem);
@ -1039,7 +1042,7 @@
if (dyn->d_tag == DT_RELCOUNT) if (dyn->d_tag == DT_RELCOUNT)
{ {
@@ -1044,7 +1058,9 @@ section [%2d] '%s': DT_RELCOUNT used for @@ -1063,7 +1077,9 @@ section [%2d] '%s': DT_RELCOUNT used for
/* Does the number specified number of relative /* Does the number specified number of relative
relocations exceed the total number of relocations exceed the total number of
relocations? */ relocations? */
@ -1050,7 +1053,7 @@
ERROR (gettext ("\ ERROR (gettext ("\
section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"), section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"),
idx, section_name (ebl, idx), idx, section_name (ebl, idx),
@@ -1204,7 +1220,8 @@ section [%2d] '%s': no relocations for m @@ -1223,7 +1239,8 @@ section [%2d] '%s': no relocations for m
} }
} }
@ -1060,7 +1063,7 @@
ERROR (gettext (reltype == ELF_T_RELA ? "\ ERROR (gettext (reltype == ELF_T_RELA ? "\
section [%2d] '%s': section entry size does not match ElfXX_Rela\n" : "\ section [%2d] '%s': section entry size does not match ElfXX_Rela\n" : "\
section [%2d] '%s': section entry size does not match ElfXX_Rel\n"), section [%2d] '%s': section entry size does not match ElfXX_Rel\n"),
@@ -1427,7 +1444,8 @@ check_rela (Ebl *ebl, GElf_Ehdr *ehdr, G @@ -1446,7 +1463,8 @@ check_rela (Ebl *ebl, GElf_Ehdr *ehdr, G
Elf_Data *symdata = elf_getdata (symscn, NULL); Elf_Data *symdata = elf_getdata (symscn, NULL);
enum load_state state = state_undecided; enum load_state state = state_undecided;
@ -1070,7 +1073,7 @@
{ {
GElf_Rela rela_mem; GElf_Rela rela_mem;
GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem); GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem);
@@ -1477,7 +1495,8 @@ check_rel (Ebl *ebl, GElf_Ehdr *ehdr, GE @@ -1496,7 +1514,8 @@ check_rel (Ebl *ebl, GElf_Ehdr *ehdr, GE
Elf_Data *symdata = elf_getdata (symscn, NULL); Elf_Data *symdata = elf_getdata (symscn, NULL);
enum load_state state = state_undecided; enum load_state state = state_undecided;
@ -1080,7 +1083,7 @@
{ {
GElf_Rel rel_mem; GElf_Rel rel_mem;
GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem); GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem);
@@ -1580,7 +1599,8 @@ section [%2d] '%s': referenced as string @@ -1599,7 +1618,8 @@ section [%2d] '%s': referenced as string
shdr->sh_link, section_name (ebl, shdr->sh_link), shdr->sh_link, section_name (ebl, shdr->sh_link),
idx, section_name (ebl, idx)); idx, section_name (ebl, idx));
@ -1090,7 +1093,7 @@
ERROR (gettext ("\ ERROR (gettext ("\
section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"), section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"),
idx, section_name (ebl, idx)); idx, section_name (ebl, idx));
@@ -1590,7 +1610,7 @@ section [%2d] '%s': section entry size d @@ -1609,7 +1629,7 @@ section [%2d] '%s': section entry size d
idx, section_name (ebl, idx)); idx, section_name (ebl, idx));
bool non_null_warned = false; bool non_null_warned = false;
@ -1099,7 +1102,7 @@
{ {
GElf_Dyn dyn_mem; GElf_Dyn dyn_mem;
GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem); GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem);
@@ -1871,6 +1891,8 @@ section [%2d] '%s': entry size does not @@ -1890,6 +1910,8 @@ section [%2d] '%s': entry size does not
idx, section_name (ebl, idx)); idx, section_name (ebl, idx));
if (symshdr != NULL if (symshdr != NULL
@ -1108,7 +1111,7 @@
&& (shdr->sh_size / shdr->sh_entsize && (shdr->sh_size / shdr->sh_entsize
< symshdr->sh_size / symshdr->sh_entsize)) < symshdr->sh_size / symshdr->sh_entsize))
ERROR (gettext ("\ ERROR (gettext ("\
@@ -1897,6 +1919,12 @@ section [%2d] '%s': extended section ind @@ -1916,6 +1938,12 @@ section [%2d] '%s': extended section ind
} }
Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL); Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
@ -1121,7 +1124,7 @@
if (*((Elf32_Word *) data->d_buf) != 0) if (*((Elf32_Word *) data->d_buf) != 0)
ERROR (gettext ("symbol 0 should have zero extended section index\n")); ERROR (gettext ("symbol 0 should have zero extended section index\n"));
@@ -1939,7 +1967,7 @@ section [%2d] '%s': hash table section i @@ -1958,7 +1986,7 @@ section [%2d] '%s': hash table section i
size_t maxidx = nchain; size_t maxidx = nchain;
@ -1130,7 +1133,7 @@
{ {
size_t symsize = symshdr->sh_size / symshdr->sh_entsize; size_t symsize = symshdr->sh_size / symshdr->sh_entsize;
@@ -1950,18 +1978,28 @@ section [%2d] '%s': hash table section i @@ -1969,18 +1997,28 @@ section [%2d] '%s': hash table section i
maxidx = symsize; maxidx = symsize;
} }
@ -1161,7 +1164,7 @@
} }
@@ -1991,18 +2029,28 @@ section [%2d] '%s': hash table section i @@ -2010,18 +2048,28 @@ section [%2d] '%s': hash table section i
maxidx = symsize; maxidx = symsize;
} }
@ -1193,7 +1196,7 @@
} }
@@ -2027,7 +2075,7 @@ section [%2d] '%s': bitmask size not pow @@ -2046,7 +2094,7 @@ section [%2d] '%s': bitmask size not pow
if (shdr->sh_size < (4 + bitmask_words + nbuckets) * sizeof (Elf32_Word)) if (shdr->sh_size < (4 + bitmask_words + nbuckets) * sizeof (Elf32_Word))
{ {
ERROR (gettext ("\ ERROR (gettext ("\
@ -1202,7 +1205,7 @@
idx, section_name (ebl, idx), (long int) shdr->sh_size, idx, section_name (ebl, idx), (long int) shdr->sh_size,
(long int) ((4 + bitmask_words + nbuckets) * sizeof (Elf32_Word))); (long int) ((4 + bitmask_words + nbuckets) * sizeof (Elf32_Word)));
return; return;
@@ -2699,8 +2747,9 @@ section [%2d] '%s' refers in sh_link to @@ -2718,8 +2766,9 @@ section [%2d] '%s' refers in sh_link to
/* The number of elements in the version symbol table must be the /* The number of elements in the version symbol table must be the
same as the number of symbols. */ same as the number of symbols. */
@ -1216,7 +1219,7 @@
idx, section_name (ebl, idx), idx, section_name (ebl, idx),
--- elfutils/src/readelf.c --- elfutils/src/readelf.c
+++ elfutils/src/readelf.c +++ elfutils/src/readelf.c
@@ -1146,6 +1146,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G @@ -1169,6 +1169,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
Elf32_Word *grpref = (Elf32_Word *) data->d_buf; Elf32_Word *grpref = (Elf32_Word *) data->d_buf;
GElf_Sym sym_mem; GElf_Sym sym_mem;
@ -1225,7 +1228,7 @@
printf ((grpref[0] & GRP_COMDAT) printf ((grpref[0] & GRP_COMDAT)
? ngettext ("\ ? ngettext ("\
\nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n", \nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n",
@@ -1158,8 +1160,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G @@ -1181,8 +1183,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
data->d_size / sizeof (Elf32_Word) - 1), data->d_size / sizeof (Elf32_Word) - 1),
elf_ndxscn (scn), elf_ndxscn (scn),
elf_strptr (ebl->elf, shstrndx, shdr->sh_name), elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
@ -1236,7 +1239,7 @@
?: gettext ("<INVALID SYMBOL>"), ?: gettext ("<INVALID SYMBOL>"),
data->d_size / sizeof (Elf32_Word) - 1); data->d_size / sizeof (Elf32_Word) - 1);
@@ -1310,7 +1312,8 @@ static void @@ -1333,7 +1335,8 @@ static void
handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
{ {
int class = gelf_getclass (ebl->elf); int class = gelf_getclass (ebl->elf);
@ -1246,7 +1249,7 @@
Elf_Data *data; Elf_Data *data;
size_t cnt; size_t cnt;
size_t shstrndx; size_t shstrndx;
@@ -1325,6 +1328,11 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn, @@ -1348,6 +1351,11 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn,
error (EXIT_FAILURE, 0, error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index")); gettext ("cannot get section header string table index"));
@ -1258,7 +1261,7 @@
printf (ngettext ("\ printf (ngettext ("\
\nDynamic segment contains %lu entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", \nDynamic segment contains %lu entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
"\ "\
@@ -1334,9 +1342,7 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn, @@ -1357,9 +1365,7 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn,
class == ELFCLASS32 ? 10 : 18, shdr->sh_addr, class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
shdr->sh_offset, shdr->sh_offset,
(int) shdr->sh_link, (int) shdr->sh_link,
@ -1269,7 +1272,7 @@
fputs_unlocked (gettext (" Type Value\n"), stdout); fputs_unlocked (gettext (" Type Value\n"), stdout);
for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt) for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
@@ -1919,6 +1925,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G @@ -1942,6 +1948,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
error (EXIT_FAILURE, 0, error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index")); gettext ("cannot get section header string table index"));
@ -1283,7 +1286,7 @@
/* Now we can compute the number of entries in the section. */ /* Now we can compute the number of entries in the section. */
unsigned int nsyms = data->d_size / (class == ELFCLASS32 unsigned int nsyms = data->d_size / (class == ELFCLASS32
? sizeof (Elf32_Sym) ? sizeof (Elf32_Sym)
@@ -1929,15 +1942,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G @@ -1952,15 +1965,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
nsyms), nsyms),
(unsigned int) elf_ndxscn (scn), (unsigned int) elf_ndxscn (scn),
elf_strptr (ebl->elf, shstrndx, shdr->sh_name), nsyms); elf_strptr (ebl->elf, shstrndx, shdr->sh_name), nsyms);
@ -1300,7 +1303,7 @@
fputs_unlocked (class == ELFCLASS32 fputs_unlocked (class == ELFCLASS32
? gettext ("\ ? gettext ("\
@@ -2173,7 +2183,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, @@ -2196,7 +2206,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
error (EXIT_FAILURE, 0, error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index")); gettext ("cannot get section header string table index"));
@ -1315,7 +1318,7 @@
printf (ngettext ("\ printf (ngettext ("\
\nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", \nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
"\ "\
@@ -2184,9 +2200,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, @@ -2207,9 +2223,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
class == ELFCLASS32 ? 10 : 18, shdr->sh_addr, class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
shdr->sh_offset, shdr->sh_offset,
(unsigned int) shdr->sh_link, (unsigned int) shdr->sh_link,
@ -1326,7 +1329,7 @@
unsigned int offset = 0; unsigned int offset = 0;
for (int cnt = shdr->sh_info; --cnt >= 0; ) for (int cnt = shdr->sh_info; --cnt >= 0; )
@@ -2239,8 +2253,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G @@ -2262,8 +2276,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
error (EXIT_FAILURE, 0, error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index")); gettext ("cannot get section header string table index"));
@ -1342,7 +1345,7 @@
printf (ngettext ("\ printf (ngettext ("\
\nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", \nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
"\ "\
@@ -2252,9 +2272,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G @@ -2275,9 +2295,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
class == ELFCLASS32 ? 10 : 18, shdr->sh_addr, class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
shdr->sh_offset, shdr->sh_offset,
(unsigned int) shdr->sh_link, (unsigned int) shdr->sh_link,
@ -1353,7 +1356,7 @@
unsigned int offset = 0; unsigned int offset = 0;
for (int cnt = shdr->sh_info; --cnt >= 0; ) for (int cnt = shdr->sh_info; --cnt >= 0; )
@@ -2516,8 +2534,14 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G @@ -2539,8 +2557,14 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G
filename = NULL; filename = NULL;
} }
@ -1369,7 +1372,7 @@
printf (ngettext ("\ printf (ngettext ("\
\nVersion symbols section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'", \nVersion symbols section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'",
"\ "\
@@ -2529,9 +2553,7 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G @@ -2552,9 +2576,7 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G
class == ELFCLASS32 ? 10 : 18, shdr->sh_addr, class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
shdr->sh_offset, shdr->sh_offset,
(unsigned int) shdr->sh_link, (unsigned int) shdr->sh_link,
@ -1380,7 +1383,7 @@
/* Now we can finally look at the actual contents of this section. */ /* Now we can finally look at the actual contents of this section. */
for (unsigned int cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt) for (unsigned int cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
@@ -2583,7 +2605,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, @@ -2606,7 +2628,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt) for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt)
++counts[lengths[cnt]]; ++counts[lengths[cnt]];
@ -1399,7 +1402,7 @@
printf (ngettext ("\ printf (ngettext ("\
\nHistogram for bucket list length in section [%2u] '%s' (total of %d bucket):\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", \nHistogram for bucket list length in section [%2u] '%s' (total of %d bucket):\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
"\ "\
@@ -2596,9 +2628,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, @@ -2619,9 +2651,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
shdr->sh_addr, shdr->sh_addr,
shdr->sh_offset, shdr->sh_offset,
(unsigned int) shdr->sh_link, (unsigned int) shdr->sh_link,
@ -1410,7 +1413,7 @@
if (extrastr != NULL) if (extrastr != NULL)
fputs (extrastr, stdout); fputs (extrastr, stdout);
@@ -4231,6 +4261,16 @@ print_debug_aranges_section (Dwfl_Module @@ -4262,6 +4292,16 @@ print_debug_aranges_section (Dwfl_Module
return; return;
} }

View File

@ -1,24 +1,24 @@
%define eu_version 0.143 %global eu_version 0.144
%define eu_release 1 %global eu_release 1
%if %{?_with_compat:1}%{!?_with_compat:0} %if %{?_with_compat:1}%{!?_with_compat:0}
%define compat 1 %global compat 1
%else %else
%define compat 0 %global compat 0
%endif %endif
%if 0%{?fedora} >= 8 %if 0%{?fedora} >= 8
%define scanf_has_m 1 %global scanf_has_m 1
%endif %endif
%if 0%{?rhel} >= 6 %if 0%{?rhel} >= 6
%define scanf_has_m 1 %global scanf_has_m 1
%endif %endif
%if 0%{?fedora} >= 7 %if 0%{?fedora} >= 7
%define separate_devel_static 1 %global separate_devel_static 1
%endif %endif
%if 0%{?rhel} >= 6 %if 0%{?rhel} >= 6
%define separate_devel_static 1 %global separate_devel_static 1
%endif %endif
Summary: A collection of utilities and DSOs to handle compiled objects Summary: A collection of utilities and DSOs to handle compiled objects
@ -50,20 +50,20 @@ BuildRequires: glibc-headers >= 2.3.4-11
BuildRequires: gcc >= 3.2 BuildRequires: gcc >= 3.2
%endif %endif
%define use_zlib 0 %global use_zlib 0
%if 0%{?fedora} >= 5 %if 0%{?fedora} >= 5
%define use_zlib 1 %global use_zlib 1
%endif %endif
%if 0%{?rhel} >= 5 %if 0%{?rhel} >= 5
%define use_zlib 1 %global use_zlib 1
%endif %endif
%define use_xz 0 %global use_xz 0
%if 0%{?fedora} >= 10 %if 0%{?fedora} >= 10
%define use_xz 1 %global use_xz 1
%endif %endif
%if 0%{?rhel} >= 6 %if 0%{?rhel} >= 6
%define use_xz 1 %global use_xz 1
%endif %endif
%if %{use_zlib} %if %{use_zlib}
@ -75,8 +75,8 @@ BuildRequires: bzip2-devel
BuildRequires: xz-devel BuildRequires: xz-devel
%endif %endif
%define _gnu %{nil} %global _gnu %{nil}
%define _program_prefix eu- %global _program_prefix eu-
%description %description
Elfutils is a collection of utilities, including ld (a linker), Elfutils is a collection of utilities, including ld (a linker),
@ -195,7 +195,10 @@ RPM_OPT_FLAGS=${RPM_OPT_FLAGS/-Wall/}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__NO_INLINE__" RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__NO_INLINE__"
%endif %endif
%configure CFLAGS="$RPM_OPT_FLAGS -fexceptions" %configure CFLAGS="$RPM_OPT_FLAGS -fexceptions" || {
cat config.log
exit 2
}
make -s %{?_smp_mflags} make -s %{?_smp_mflags}
%install %install
@ -288,6 +291,14 @@ rm -rf ${RPM_BUILD_ROOT}
%{_libdir}/libelf.a %{_libdir}/libelf.a
%changelog %changelog
* Thu Jan 14 2010 Roland McGrath <roland@redhat.com> - 0.144-1
- Update to 0.144
- libdw: New function dwarf_aggregate_size for computing (constant) type
sizes, including array_type cases with nontrivial calculation.
- readelf: Don't give errors for missing info under -a.
Handle Linux "VMCOREINFO" notes under -n.
- Resolves: RHBZ #527004, RHBZ #530704, RHBZ #550858
* Mon Sep 21 2009 Roland McGrath <roland@redhat.com> - 0.143-1 * Mon Sep 21 2009 Roland McGrath <roland@redhat.com> - 0.143-1
- Update to 0.143 - Update to 0.143
- libdw: Various convenience functions for individual attributes now use - libdw: Various convenience functions for individual attributes now use

View File

@ -1 +1 @@
06e35c348e78dec58f6aeb51bd397760 elfutils-0.143.tar.bz2 e2c49192043656e52f671ffa8a788e09 elfutils-0.144.tar.bz2