From 20454159c6fa342357b65f0a83fe8b82e5b08a3f Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Thu, 25 Jul 2013 14:33:04 +0200 Subject: [PATCH] Update to 0.156. - #890447 - Add __bss_start and __TMC_END__ to elflint. - #909481 - Only try opening files with installed compression libraries. - #914908 - Add __bss_start__ to elflint. - #853757 - Updated Polish translation. - #985438 - Incorrect prototype of __libdwfl_find_elf_build_id. - Drop upstreamed elfutils-0.155-binutils-pr-ld-13621.patch. - Drop upstreamed elfutils-0.155-mem-align.patch. - Drop upstreamed elfutils-0.155-sizeof-pointer-memaccess.patch. --- .gitignore | 4 +- elfutils-0.155-binutils-pr-ld-13621.patch | 97 -- elfutils-0.155-mem-align.patch | 194 --- elfutils-0.155-sizeof-pointer-memaccess.patch | 68 -- elfutils-portability.patch | 1039 +++++++++-------- elfutils-robustify.patch | 284 ++--- elfutils.spec | 24 +- sources | 2 +- 8 files changed, 680 insertions(+), 1032 deletions(-) delete mode 100644 elfutils-0.155-binutils-pr-ld-13621.patch delete mode 100644 elfutils-0.155-mem-align.patch delete mode 100644 elfutils-0.155-sizeof-pointer-memaccess.patch diff --git a/.gitignore b/.gitignore index c7fda2c..2d8d81a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -/elfutils-0.154.tar.bz2 -/elfutils-*/ -/elfutils-0.155.tar.bz2 +/elfutils-0.156.tar.bz2 diff --git a/elfutils-0.155-binutils-pr-ld-13621.patch b/elfutils-0.155-binutils-pr-ld-13621.patch deleted file mode 100644 index a23425c..0000000 --- a/elfutils-0.155-binutils-pr-ld-13621.patch +++ /dev/null @@ -1,97 +0,0 @@ -commit 3bdc16ce98295463c071192eab2ec611a8edc508 -Author: Mark Wielaard -Date: Wed Feb 6 16:20:17 2013 +0100 - - elflint: Add two more symbols to gnuld list of allowed bad values. - - Add __bss_start and __TMC_END__ to the list of symbols allowed to have - out of section values because of the following GNU ld bug: - http://sourceware.org/bugzilla/show_bug.cgi?id=13621. - Allow them to appear in either .symtab or .dynsym, but only when they - are zero sized. It is impossible to define a general rule for this bug, - but this should catch most common issues that are mostly harmless - because the symbols signify the removed section was empty to being with. - This catches at least all symbols often flagged in the tests. - - Signed-off-by: Mark Wielaard - -diff --git a/src/ChangeLog b/src/ChangeLog -index f3f9b51..7d7b66f 100644 ---- a/src/ChangeLog -+++ b/src/ChangeLog -@@ -1,3 +1,10 @@ -+2013-02-06 Mark Wielaard -+ -+ * elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the -+ list of symbols allowed to have out of section values because of -+ GNU ld bugs in either .symtab or .dynsym, but only when they are -+ zero sized. -+ - 2012-08-27 Mark Wielaard - - * readelf.c (print_debug_macro_section): Print offset as PRIx64. -diff --git a/src/elflint.c b/src/elflint.c -index 4084987..bc5ed33 100644 ---- a/src/elflint.c -+++ b/src/elflint.c -@@ -767,15 +767,22 @@ section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n"), - { - /* GNU ld has severe bugs. When it decides to remove - empty sections it leaves symbols referencing them -- behind. These are symbols in .symtab. */ -+ behind. These are symbols in .symtab or .dynsym -+ and for the named symbols have zero size. See -+ sourceware PR13621. */ - if (!gnuld -- || strcmp (section_name (ebl, idx), ".symtab") -+ || (strcmp (section_name (ebl, idx), ".symtab") -+ && strcmp (section_name (ebl, idx), -+ ".dynsym")) -+ || sym->st_size != 0 - || (strcmp (name, "__preinit_array_start") != 0 - && strcmp (name, "__preinit_array_end") != 0 - && strcmp (name, "__init_array_start") != 0 - && strcmp (name, "__init_array_end") != 0 - && strcmp (name, "__fini_array_start") != 0 -- && strcmp (name, "__fini_array_end") != 0)) -+ && strcmp (name, "__fini_array_end") != 0 -+ && strcmp (name, "__bss_start") != 0 -+ && strcmp (name, "__TMC_END__") != 0)) - ERROR (gettext ("\ - section [%2d] '%s': symbol %zu: st_value out of bounds\n"), - idx, section_name (ebl, idx), cnt); -commit b94cceae503b56fb360cd597f154fa2b33552887 -Author: Mark Wielaard -Date: Sun Feb 24 22:58:49 2013 +0100 - - elflint.c (check_symtab): Add __bss_start__ to the list of allowed symbols. - - Some architectures (ARM) use __bss_start__ instead of __bss_start. - - Signed-off-by: Mark Wielaard - -diff --git a/src/ChangeLog b/src/ChangeLog -index 7d7b66f..6e219e6 100644 ---- a/src/ChangeLog -+++ b/src/ChangeLog -@@ -1,3 +1,8 @@ -+2013-02-24 Mark Wielaard -+ -+ * elflint.c (check_symtab): Add __bss_start__ to the list of symbols -+ allowed to have out of section values because of GNU ld bugs. -+ - 2013-02-06 Mark Wielaard - - * elflint.c (check_symtab): Add __bss_start and __TMC_END__ to the -diff --git a/src/elflint.c b/src/elflint.c -index bc5ed33..acd458b 100644 ---- a/src/elflint.c -+++ b/src/elflint.c -@@ -782,6 +782,7 @@ section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n"), - && strcmp (name, "__fini_array_start") != 0 - && strcmp (name, "__fini_array_end") != 0 - && strcmp (name, "__bss_start") != 0 -+ && strcmp (name, "__bss_start__") != 0 - && strcmp (name, "__TMC_END__") != 0)) - ERROR (gettext ("\ - section [%2d] '%s': symbol %zu: st_value out of bounds\n"), diff --git a/elfutils-0.155-mem-align.patch b/elfutils-0.155-mem-align.patch deleted file mode 100644 index 37c1891..0000000 --- a/elfutils-0.155-mem-align.patch +++ /dev/null @@ -1,194 +0,0 @@ ---- a/libdw/ChangeLog 2012-08-27 20:29:31.000000000 +0200 -+++ b/libdw/ChangeLog 2013-01-10 10:59:28.039026230 +0100 -@@ -1,3 +1,9 @@ -+2013-01-07 Roland McGrath -+ -+ * memory-access.h -+ [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro. -+ [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function. -+ - 2012-08-24 Mark Wielaard - - * dwarf_begin_elf.c (check_section): Only probe for dwz multi files ---- a/libdw/memory-access.h 2012-08-27 20:27:31.000000000 +0200 -+++ b/libdw/memory-access.h 2013-01-10 10:56:07.171152555 +0100 -@@ -1,5 +1,5 @@ - /* Unaligned memory access functionality. -- Copyright (C) 2000-2010 Red Hat, Inc. -+ Copyright (C) 2000-2013 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper , 2001. - -@@ -147,6 +147,8 @@ - ? (int32_t) bswap_32 (*((const int32_t *) (Addr))) \ - : *((const int32_t *) (Addr))) - -+# define read_8ubyte_unaligned_noncvt(Addr) \ -+ *((const uint64_t *) (Addr)) - # define read_8ubyte_unaligned(Dbg, Addr) \ - (unlikely ((Dbg)->other_byte_order) \ - ? bswap_64 (*((const uint64_t *) (Addr))) \ -@@ -223,6 +225,12 @@ - } - - static inline uint64_t -+read_8ubyte_unaligned_noncvt (const void *p) -+{ -+ const union unaligned *up = p; -+ return up->u8; -+} -+static inline uint64_t - read_8ubyte_unaligned_1 (bool other_byte_order, const void *p) - { - const union unaligned *up = p; ---- a/libdwfl/ChangeLog 2013-01-10 10:59:53.882008409 +0100 -+++ b/libdwfl/ChangeLog 2013-01-10 10:57:48.451130775 +0100 -@@ -1,3 +1,9 @@ -+2013-01-07 Roland McGrath -+ -+ * link_map.c (auxv_format_probe): Handle unaligned 64-bit data, but -+ still assume the data is at least 32-bit aligned anyway. -+ (dwfl_link_map_report): Handle unaligned auxv data. -+ - 2012-08-01 Petr Machata - - * offline.c (process_archive_member): Ignore entry "/SYM64/". ---- a/libdwfl/link_map.c 2012-08-27 20:27:31.000000000 +0200 -+++ b/libdwfl/link_map.c 2013-01-10 10:56:07.207002831 +0100 -@@ -1,5 +1,5 @@ - /* Report modules by examining dynamic linker data structures. -- Copyright (C) 2008-2010 Red Hat, Inc. -+ Copyright (C) 2008-2013 Red Hat, Inc. - This file is part of elfutils. - - This file is free software; you can redistribute it and/or modify -@@ -28,6 +28,7 @@ - - #include - #include "libdwflP.h" -+#include "../libdw/memory-access.h" - - #include - #include -@@ -66,15 +67,22 @@ - - inline bool check64 (size_t i) - { -- if (u->a64[i].a_type == BE64 (PROBE_TYPE) -- && u->a64[i].a_un.a_val == BE64 (PROBE_VAL64)) -+ /* The AUXV pointer might not even be naturally aligned for 64-bit -+ data, because note payloads in a core file are not aligned. -+ But we assume the data is 32-bit aligned. */ -+ -+ uint64_t type = read_8ubyte_unaligned_noncvt (&u->a64[i].a_type); -+ uint64_t val = read_8ubyte_unaligned_noncvt (&u->a64[i].a_un.a_val); -+ -+ if (type == BE64 (PROBE_TYPE) -+ && val == BE64 (PROBE_VAL64)) - { - *elfdata = ELFDATA2MSB; - return true; - } - -- if (u->a64[i].a_type == LE64 (PROBE_TYPE) -- && u->a64[i].a_un.a_val == LE64 (PROBE_VAL64)) -+ if (type == LE64 (PROBE_TYPE) -+ && val == LE64 (PROBE_VAL64)) - { - *elfdata = ELFDATA2LSB; - return true; -@@ -618,29 +626,32 @@ - GElf_Xword phent = 0; - GElf_Xword phnum = 0; - --#define AUXV_SCAN(NN, BL) do \ -- { \ -- const Elf##NN##_auxv_t *av = auxv; \ -- for (size_t i = 0; i < auxv_size / sizeof av[0]; ++i) \ -- { \ -- Elf##NN##_Addr val = BL##NN (av[i].a_un.a_val); \ -- if (av[i].a_type == BL##NN (AT_ENTRY)) \ -- entry = val; \ -- else if (av[i].a_type == BL##NN (AT_PHDR)) \ -- phdr = val; \ -- else if (av[i].a_type == BL##NN (AT_PHNUM)) \ -- phnum = val; \ -- else if (av[i].a_type == BL##NN (AT_PHENT)) \ -- phent = val; \ -- else if (av[i].a_type == BL##NN (AT_PAGESZ)) \ -- { \ -- if (val > 1 \ -- && (dwfl->segment_align == 0 \ -- || val < dwfl->segment_align)) \ -- dwfl->segment_align = val; \ -- } \ -- } \ -- } \ -+#define READ_AUXV32(ptr) read_4ubyte_unaligned_noncvt (ptr) -+#define READ_AUXV64(ptr) read_8ubyte_unaligned_noncvt (ptr) -+#define AUXV_SCAN(NN, BL) do \ -+ { \ -+ const Elf##NN##_auxv_t *av = auxv; \ -+ for (size_t i = 0; i < auxv_size / sizeof av[0]; ++i) \ -+ { \ -+ uint##NN##_t type = READ_AUXV##NN (&av[i].a_type); \ -+ uint##NN##_t val = BL##NN (READ_AUXV##NN (&av[i].a_un.a_val)); \ -+ if (type == BL##NN (AT_ENTRY)) \ -+ entry = val; \ -+ else if (type == BL##NN (AT_PHDR)) \ -+ phdr = val; \ -+ else if (type == BL##NN (AT_PHNUM)) \ -+ phnum = val; \ -+ else if (type == BL##NN (AT_PHENT)) \ -+ phent = val; \ -+ else if (type == BL##NN (AT_PAGESZ)) \ -+ { \ -+ if (val > 1 \ -+ && (dwfl->segment_align == 0 \ -+ || val < dwfl->segment_align)) \ -+ dwfl->segment_align = val; \ -+ } \ -+ } \ -+ } \ - while (0) - - if (elfclass == ELFCLASS32) ---- a/libelf/ChangeLog 2013-01-10 10:59:53.884010033 +0100 -+++ b/libelf/ChangeLog 2013-01-10 10:58:57.505003982 +0100 -@@ -1,3 +1,13 @@ -+2013-01-07 Roland McGrath -+ -+ * elf_getarsym.c (elf_getarsym): Copy FILE_DATA into stack space if it -+ would be unaligned and !ALLOW_UNALIGNED. -+ -+2013-01-07 Roland McGrath -+ -+ * elf_getarsym.c (read_number_entries): Use memcpy instead of pointer -+ dereference so as not to assume the field is naturally aligned. -+ - 2012-08-16 Roland McGrath - - * elf.h: Update from glibc. ---- a/libelf/elf_getarsym.c 2013-01-10 10:59:53.888006636 +0100 -+++ b/libelf/elf_getarsym.c 2013-01-10 10:56:07.210254028 +0100 -@@ -57,7 +57,9 @@ - - size_t w = index64_p ? 8 : 4; - if (elf->map_address != NULL) -- u = *(union u *) (elf->map_address + *offp); -+ /* Use memcpy instead of pointer dereference so as not to assume the -+ field is naturally aligned within the file. */ -+ memcpy (&u, elf->map_address + *offp, sizeof u); - else if ((size_t) pread_retry (elf->fildes, &u, w, *offp) != w) - return -1; - -@@ -241,6 +243,9 @@ - else - { - file_data = (void *) (elf->map_address + off); -+ if (!ALLOW_UNALIGNED -+ && ((uintptr_t) file_data & -(uintptr_t) n) != 0) -+ file_data = memcpy (alloca (sz), elf->map_address + off, sz); - str_data = (char *) (elf->map_address + off + sz); - } - diff --git a/elfutils-0.155-sizeof-pointer-memaccess.patch b/elfutils-0.155-sizeof-pointer-memaccess.patch deleted file mode 100644 index 4e0330c..0000000 --- a/elfutils-0.155-sizeof-pointer-memaccess.patch +++ /dev/null @@ -1,68 +0,0 @@ -commit 1a4d0668d18bf1090c5c08cdb5cb3ba2b8eb5410 -Author: David Abdurachmanov -Date: Sun Jan 13 16:44:21 2013 +0100 - - ar.c (do_oper_delete): Fix num passed to memset. - - Signed-off-by: David Abdurachmanov - -diff --git a/src/ar.c b/src/ar.c -index 03da1b7..2d6ad60 100644 ---- a/src/ar.c -+++ b/src/ar.c -@@ -919,7 +919,7 @@ do_oper_delete (const char *arfname, char **argv, int argc, - long int instance) - { - bool *found = alloca (sizeof (bool) * argc); -- memset (found, '\0', sizeof (found)); -+ memset (found, '\0', sizeof (bool) * argc); - - /* List of the files we keep. */ - struct armem *to_copy = NULL; - -commit 57bd66cabf6e6b9ecf622cdbf350804897a8df58 -Author: Roland McGrath -Date: Tue Dec 11 09:42:07 2012 -0800 - - nm: Fix size passed to snprintf for invalid sh_name case. - - Signed-off-by: Roland McGrath - -diff --git a/src/nm.c b/src/nm.c -index f50da0b..8a1c57a 100644 ---- a/src/nm.c -+++ b/src/nm.c -@@ -769,8 +769,9 @@ show_symbols_sysv (Ebl *ebl, GElf_Word strndx, const char *fullname, - gelf_getshdr (scn, &shdr_mem)->sh_name); - if (unlikely (name == NULL)) - { -- name = alloca (sizeof "[invalid sh_name 0x12345678]"); -- snprintf (name, sizeof name, "[invalid sh_name %#" PRIx32 "]", -+ const size_t bufsz = sizeof "[invalid sh_name 0x12345678]" -+ name = alloca (bufsz); -+ snprintf (name, bufsz, "[invalid sh_name %#" PRIx32 "]", - gelf_getshdr (scn, &shdr_mem)->sh_name); - } - scnnames[elf_ndxscn (scn)] = name; - -commit 7df3d2cd70932cd70515dbeb75e4db66fd27f192 -Author: Mark Wielaard -Date: Tue Dec 11 22:27:05 2012 +0100 - - Add missing semicolon in show_symbols_sysv - - Signed-off-by: Mark Wielaard - -diff --git a/src/nm.c b/src/nm.c -index 8a1c57a..7aae84b 100644 ---- a/src/nm.c -+++ b/src/nm.c -@@ -769,7 +769,7 @@ show_symbols_sysv (Ebl *ebl, GElf_Word strndx, const char *fullname, - gelf_getshdr (scn, &shdr_mem)->sh_name); - if (unlikely (name == NULL)) - { -- const size_t bufsz = sizeof "[invalid sh_name 0x12345678]" -+ const size_t bufsz = sizeof "[invalid sh_name 0x12345678]"; - name = alloca (bufsz); - snprintf (name, bufsz, "[invalid sh_name %#" PRIx32 "]", - gelf_getshdr (scn, &shdr_mem)->sh_name); diff --git a/elfutils-portability.patch b/elfutils-portability.patch index dd9eeb2..414255a 100644 --- a/elfutils-portability.patch +++ b/elfutils-portability.patch @@ -1,102 +1,6 @@ ---- elfutils/backends/ChangeLog -+++ elfutils/backends/ChangeLog -@@ -135,6 +135,10 @@ - * ppc_attrs.c (ppc_check_object_attribute): Handle tag - GNU_Power_ABI_Struct_Return. - -+2009-01-23 Roland McGrath -+ -+ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED). -+ - 2008-10-04 Ulrich Drepper - - * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and -@@ -462,6 +466,11 @@ - * sparc_init.c: Likewise. - * x86_64_init.c: Likewise. - -+2005-11-22 Roland McGrath -+ -+ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure. -+ (libebl_%.so rule): Use it in place of -Wl,--as-needed. -+ - 2005-11-19 Roland McGrath - - * ppc64_reloc.def: REL30 -> ADDR30. -@@ -484,6 +493,9 @@ - * Makefile.am (uninstall): Don't try to remove $(pkgincludedir). - (CLEANFILES): Add libebl_$(m).so. - -+ * Makefile.am (WEXTRA): New variable, substituted by configure. -+ (AM_CFLAGS): Use it in place of -Wextra. -+ - * ppc_reloc.def: Update bits per Alan Modra . - * ppc64_reloc.def: Likewise. - ---- elfutils/backends/Makefile.am -+++ elfutils/backends/Makefile.am -@@ -111,7 +111,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a - $(LINK) -shared -o $(@:.map=.so) \ - -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ - -Wl,--version-script,$(@:.so=.map) \ -- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap) -+ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap) - $(textrel_check) - - libebl_i386.so: $(cpu_i386) ---- elfutils/backends/Makefile.in -+++ elfutils/backends/Makefile.in -@@ -38,7 +38,8 @@ build_triplet = @build@ - host_triplet = @host@ - DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog --@MUDFLAP_TRUE@am__append_1 = -fmudflap -+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) -+@MUDFLAP_TRUE@am__append_2 = -fmudflap - subdir = backends - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ -@@ -172,6 +173,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ - LDFLAGS = @LDFLAGS@ -+LD_AS_NEEDED = @LD_AS_NEEDED@ - LEX = @LEX@ - LEXLIB = @LEXLIB@ - LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -201,6 +203,7 @@ SHELL = @SHELL@ - STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ -+WEXTRA = @WEXTRA@ - XGETTEXT = @XGETTEXT@ - XGETTEXT_015 = @XGETTEXT_015@ - XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -263,10 +266,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi - -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ - -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw - AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ -- $($(*F)_no_Werror),,-Werror) $(if \ -- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ -+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ - $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ -- $(am__append_1) -+ $(am__append_1) $(am__append_2) - @MUDFLAP_FALSE@libmudflap = - @MUDFLAP_TRUE@libmudflap = -lmudflap - COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ -@@ -719,7 +721,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a - $(LINK) -shared -o $(@:.map=.so) \ - -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ - -Wl,--version-script,$(@:.so=.map) \ -- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap) -+ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap) - $(textrel_check) - - libebl_i386.so: $(cpu_i386) --- elfutils/ChangeLog +++ elfutils/ChangeLog -@@ -16,6 +16,8 @@ +@@ -46,6 +46,8 @@ 2012-01-24 Mark Wielaard @@ -105,7 +9,7 @@ * COPYING: Fix address. Updated version from gnulib. 2012-01-23 Mark Wielaard -@@ -34,6 +36,9 @@ +@@ -64,6 +66,9 @@ 2011-10-08 Mike Frysinger @@ -115,7 +19,7 @@ * configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly. 2011-10-02 Ulrich Drepper -@@ -55,6 +60,10 @@ +@@ -85,6 +90,10 @@ * configure.ac (LOCALEDIR, DATADIRNAME): Removed. @@ -126,7 +30,7 @@ 2009-09-21 Ulrich Drepper * configure.ac: Update for more modern autoconf. -@@ -63,6 +72,10 @@ +@@ -93,6 +102,10 @@ * configure.ac (zip_LIBS): Check for liblzma too. @@ -137,7 +41,7 @@ 2009-04-19 Roland McGrath * configure.ac (eu_version): Round down here, not in version.h macros. -@@ -74,6 +87,8 @@ +@@ -104,6 +117,8 @@ 2009-01-23 Roland McGrath @@ -146,7 +50,7 @@ * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3. * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of -@@ -154,6 +169,10 @@ +@@ -184,6 +199,10 @@ * configure.ac: Add dummy automake conditional to get dependencies for non-generic linker right. See src/Makefile.am. @@ -157,7 +61,7 @@ 2005-11-18 Roland McGrath * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable. -@@ -201,6 +220,17 @@ +@@ -231,6 +250,17 @@ * Makefile.am (all_SUBDIRS): Add libdwfl. * configure.ac: Write libdwfl/Makefile. @@ -175,9 +79,123 @@ 2005-05-19 Roland McGrath * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros. +--- elfutils/Makefile.in ++++ elfutils/Makefile.in +@@ -256,6 +256,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -285,6 +286,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +--- elfutils/backends/ChangeLog ++++ elfutils/backends/ChangeLog +@@ -188,6 +188,10 @@ + * ppc_attrs.c (ppc_check_object_attribute): Handle tag + GNU_Power_ABI_Struct_Return. + ++2009-01-23 Roland McGrath ++ ++ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED). ++ + 2008-10-04 Ulrich Drepper + + * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and +@@ -515,6 +519,11 @@ + * sparc_init.c: Likewise. + * x86_64_init.c: Likewise. + ++2005-11-22 Roland McGrath ++ ++ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure. ++ (libebl_%.so rule): Use it in place of -Wl,--as-needed. ++ + 2005-11-19 Roland McGrath + + * ppc64_reloc.def: REL30 -> ADDR30. +@@ -537,6 +546,9 @@ + * Makefile.am (uninstall): Don't try to remove $(pkgincludedir). + (CLEANFILES): Add libebl_$(m).so. + ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + * ppc_reloc.def: Update bits per Alan Modra . + * ppc64_reloc.def: Likewise. + +--- elfutils/backends/Makefile.am ++++ elfutils/backends/Makefile.am +@@ -112,7 +112,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a + $(LINK) -shared -o $(@:.map=.so) \ + -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ + -Wl,--version-script,$(@:.so=.map) \ +- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap) ++ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap) + $(textrel_check) + + libebl_i386.so: $(cpu_i386) +--- elfutils/backends/Makefile.in ++++ elfutils/backends/Makefile.in +@@ -83,7 +83,8 @@ host_triplet = @host@ + DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ + $(noinst_HEADERS) ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap + subdir = backends + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ +@@ -266,6 +267,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -295,6 +297,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -357,10 +360,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr + -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ + -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) ++ $(am__append_1) $(am__append_2) + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ +@@ -834,7 +836,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a + $(LINK) -shared -o $(@:.map=.so) \ + -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ + -Wl,--version-script,$(@:.so=.map) \ +- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap) ++ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap) + $(textrel_check) + + libebl_i386.so: $(cpu_i386) --- elfutils/config/ChangeLog +++ elfutils/config/ChangeLog -@@ -19,6 +19,10 @@ +@@ -27,6 +27,10 @@ * known-dwarf.awk: Use gawk. @@ -188,6 +206,24 @@ 2010-07-02 Ulrich Drepper * elfutils.spec.in: Add more BuildRequires. +--- elfutils/config/Makefile.in ++++ elfutils/config/Makefile.in +@@ -140,6 +140,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -169,6 +170,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ --- elfutils/config/eu.am +++ elfutils/config/eu.am @@ -1,6 +1,6 @@ @@ -206,7 +242,7 @@ +LD_AS_NEEDED = @LD_AS_NEEDED@ + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"' - INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. + AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. AM_CFLAGS = -std=gnu99 -Wall -Wshadow \ - $(if $($(*F)_no_Werror),,-Werror) \ - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ @@ -221,24 +257,6 @@ if MUDFLAP AM_CFLAGS += -fmudflap libmudflap = -lmudflap ---- elfutils/config/Makefile.in -+++ elfutils/config/Makefile.in -@@ -76,6 +76,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ - LDFLAGS = @LDFLAGS@ -+LD_AS_NEEDED = @LD_AS_NEEDED@ - LEX = @LEX@ - LEXLIB = @LEXLIB@ - LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -105,6 +106,7 @@ SHELL = @SHELL@ - STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ -+WEXTRA = @WEXTRA@ - XGETTEXT = @XGETTEXT@ - XGETTEXT_015 = @XGETTEXT_015@ - XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ --- elfutils/config.h.in +++ elfutils/config.h.in @@ -6,6 +6,9 @@ @@ -251,7 +269,7 @@ /* $libdir subdirectory containing libebl modules. */ #undef LIBEBL_SUBDIR -@@ -64,4 +67,7 @@ +@@ -69,4 +72,7 @@ /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES @@ -261,7 +279,7 @@ #include --- elfutils/configure +++ elfutils/configure -@@ -598,6 +598,8 @@ ZLIB_TRUE +@@ -618,6 +618,8 @@ ZLIB_TRUE LIBEBL_SUBDIR TESTS_RPATH_FALSE TESTS_RPATH_TRUE @@ -269,8 +287,8 @@ +BUILD_WERROR_TRUE BUILD_STATIC_FALSE BUILD_STATIC_TRUE - GCOV_FALSE -@@ -612,6 +614,8 @@ NEVER_TRUE + USE_VALGRIND_FALSE +@@ -635,6 +637,8 @@ NEVER_TRUE base_cpu NATIVE_LD_FALSE NATIVE_LD_TRUE @@ -279,23 +297,23 @@ LEXLIB LEX_OUTPUT_ROOT LEX -@@ -725,6 +729,7 @@ enable_mudflap - enable_debugpred +@@ -755,6 +759,7 @@ enable_debugpred enable_gprof enable_gcov + enable_valgrind +enable_werror enable_tests_rpath enable_libebl_subdir with_zlib -@@ -1378,6 +1383,7 @@ Optional Features: - prediction +@@ -1412,6 +1417,7 @@ Optional Features: --enable-gprof build binaries with gprof support --enable-gcov build binaries with gcov support + --enable-valgrind run all tests under valgrind + --disable-werror do not build with -Werror --enable-tests-rpath build $ORIGIN-using rpath into tests --enable-libebl-subdir=DIR install libebl_CPU modules in $(libdir)/DIR -@@ -3917,6 +3923,130 @@ if test "x$ac_cv_c99" != xyes; then : +@@ -4012,6 +4018,130 @@ if test "x$ac_cv_c99" != xyes; then : as_fn_error $? "gcc with C99 support required" "$LINENO" 5 fi @@ -426,7 +444,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5 $as_echo_n "checking for __thread support... " >&6; } if ${ac_cv_tls+:} false; then : -@@ -3953,7 +4083,13 @@ fi +@@ -4048,7 +4178,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 $as_echo "$ac_cv_tls" >&6; } if test "x$ac_cv_tls" != xyes; then : @@ -441,7 +459,7 @@ fi # Check whether --enable-largefile was given. -@@ -4302,6 +4438,22 @@ else +@@ -4458,6 +4594,22 @@ else fi @@ -464,7 +482,7 @@ # Check whether --enable-tests-rpath was given. if test "${enable_tests_rpath+set}" = set; then : enableval=$enable_tests_rpath; tests_use_rpath=$enableval -@@ -5022,7 +5174,7 @@ case "$eu_version" in +@@ -5178,7 +5330,7 @@ case "$eu_version" in esac # Round up to the next release API (x.y) version. @@ -473,7 +491,7 @@ cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure -@@ -5185,6 +5337,10 @@ if test -z "${BUILD_STATIC_TRUE}" && tes +@@ -5353,6 +5505,10 @@ if test -z "${BUILD_STATIC_TRUE}" && tes as_fn_error $? "conditional \"BUILD_STATIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -553,7 +571,7 @@ dnl This test must come as early as possible after the compiler configuration dnl tests, because the choice of the file model can (in principle) affect -@@ -193,6 +244,11 @@ AM_CONDITIONAL(GCOV, test "$use_gcov" = +@@ -204,6 +255,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_ AM_CONDITIONAL(BUILD_STATIC, [dnl test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes]) @@ -565,7 +583,7 @@ AC_ARG_ENABLE([tests-rpath], AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]), [tests_use_rpath=$enableval], [tests_use_rpath=no]) -@@ -304,6 +360,6 @@ case "$eu_version" in +@@ -315,6 +371,6 @@ case "$eu_version" in esac # Round up to the next release API (x.y) version. @@ -575,7 +593,7 @@ AC_OUTPUT --- elfutils/lib/ChangeLog +++ elfutils/lib/ChangeLog -@@ -35,6 +35,9 @@ +@@ -57,6 +57,9 @@ 2009-01-23 Roland McGrath @@ -585,7 +603,7 @@ * eu-config.h: Add multiple inclusion protection. 2009-01-17 Ulrich Drepper -@@ -91,6 +94,11 @@ +@@ -113,6 +116,11 @@ * Makefile.am (libeu_a_SOURCES): Add it. * system.h: Declare crc32_file. @@ -597,6 +615,47 @@ 2005-04-30 Ulrich Drepper * Makefile.am: Use -ffunction-sections for xmalloc.c. +--- elfutils/lib/Makefile.in ++++ elfutils/lib/Makefile.in +@@ -82,7 +82,8 @@ host_triplet = @host@ + DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ + $(noinst_HEADERS) ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap + subdir = lib + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ +@@ -193,6 +194,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -222,6 +224,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -283,10 +286,9 @@ zip_LIBS = @zip_LIBS@ + AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ + -I$(srcdir)/../libelf + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) -fpic ++ $(am__append_1) $(am__append_2) -fpic + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ --- elfutils/lib/eu-config.h +++ elfutils/lib/eu-config.h @@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .pr @@ -617,50 +676,9 @@ #ifdef SHARED # define OLD_VERSION(name, version) \ ---- elfutils/lib/Makefile.in -+++ elfutils/lib/Makefile.in -@@ -37,7 +37,8 @@ build_triplet = @build@ - host_triplet = @host@ - DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog --@MUDFLAP_TRUE@am__append_1 = -fmudflap -+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) -+@MUDFLAP_TRUE@am__append_2 = -fmudflap - subdir = lib - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ -@@ -100,6 +101,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ - LDFLAGS = @LDFLAGS@ -+LD_AS_NEEDED = @LD_AS_NEEDED@ - LEX = @LEX@ - LEXLIB = @LEXLIB@ - LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -129,6 +131,7 @@ SHELL = @SHELL@ - STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ -+WEXTRA = @WEXTRA@ - XGETTEXT = @XGETTEXT@ - XGETTEXT_015 = @XGETTEXT_015@ - XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -190,10 +193,9 @@ zip_LIBS = @zip_LIBS@ - INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ - -I$(srcdir)/../libelf - AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ -- $($(*F)_no_Werror),,-Werror) $(if \ -- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ -+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ - $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ -- $(am__append_1) -fpic -+ $(am__append_1) $(am__append_2) -fpic - @MUDFLAP_FALSE@libmudflap = - @MUDFLAP_TRUE@libmudflap = -lmudflap - COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ --- elfutils/libasm/ChangeLog +++ elfutils/libasm/ChangeLog -@@ -71,6 +71,11 @@ +@@ -75,6 +75,11 @@ * asm_error.c: Add new error ASM_E_IOERROR. * libasmP.h: Add ASM_E_IOERROR definition. @@ -674,10 +692,10 @@ * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. --- elfutils/libasm/Makefile.in +++ elfutils/libasm/Makefile.in -@@ -39,10 +39,11 @@ host_triplet = @host@ - DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/eu.am ChangeLog +@@ -83,10 +83,11 @@ host_triplet = @host@ + DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ + $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog -@MUDFLAP_TRUE@am__append_1 = -fmudflap +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) +@MUDFLAP_TRUE@am__append_2 = -fmudflap @@ -688,7 +706,7 @@ subdir = libasm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ -@@ -147,6 +148,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -245,6 +246,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -696,7 +714,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -176,6 +178,7 @@ SHELL = @SHELL@ +@@ -274,6 +276,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = 1 @@ -704,7 +722,7 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -238,10 +241,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi +@@ -336,10 +339,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \ -I$(top_srcdir)/libdw AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ @@ -717,7 +735,7 @@ @MUDFLAP_FALSE@libmudflap = @MUDFLAP_TRUE@libmudflap = -lmudflap COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ -@@ -270,7 +272,7 @@ libasm_a_SOURCES = asm_begin.c asm_abort +@@ -368,7 +370,7 @@ libasm_a_SOURCES = asm_begin.c asm_abort @MUDFLAP_FALSE@libasm_pic_a_SOURCES = @MUDFLAP_FALSE@am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os) @@ -728,7 +746,7 @@ EXTRA_DIST = libasm.map --- elfutils/libcpu/ChangeLog +++ elfutils/libcpu/ChangeLog -@@ -38,6 +38,9 @@ +@@ -47,6 +47,9 @@ 2009-01-23 Roland McGrath @@ -738,7 +756,7 @@ * Makefile.am (i386_parse_CFLAGS): Use quotes around command substitution that can produce leading whitespace. -@@ -367,6 +370,11 @@ +@@ -376,6 +379,11 @@ * defs/i386.doc: New file. * defs/x86_64: New file. @@ -750,29 +768,19 @@ 2005-02-15 Ulrich Drepper * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. ---- elfutils/libcpu/i386_disasm.c -+++ elfutils/libcpu/i386_disasm.c -@@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, con - - default: - assert (! "INVALID not handled"); -+ abort (); - } - } - else --- elfutils/libcpu/Makefile.in +++ elfutils/libcpu/Makefile.in -@@ -39,7 +39,8 @@ host_triplet = @host@ - DIST_COMMON = $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog \ - i386_lex.c i386_parse.c +@@ -84,7 +84,8 @@ DIST_COMMON = $(top_srcdir)/config/eu.am + $(srcdir)/Makefile.am i386_lex.c i386_parse.c \ + $(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \ + $(am__noinst_HEADERS_DIST) ChangeLog -@MUDFLAP_TRUE@am__append_1 = -fmudflap +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) +@MUDFLAP_TRUE@am__append_2 = -fmudflap @MAINTAINER_MODE_TRUE@noinst_PROGRAMS = i386_gendis$(EXEEXT) subdir = libcpu ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -@@ -117,6 +118,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -220,6 +221,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -780,7 +788,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = lex.$( * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info. -@@ -441,6 +445,10 @@ +@@ -536,6 +540,10 @@ * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too. @@ -825,7 +843,7 @@ 2009-08-10 Roland McGrath * dwarf_getscopevar.c: Use dwarf_diename. -@@ -1209,6 +1217,11 @@ +@@ -1304,6 +1312,11 @@ 2005-05-31 Roland McGrath @@ -837,6 +855,49 @@ * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to formref offset. +--- elfutils/libdw/Makefile.in ++++ elfutils/libdw/Makefile.in +@@ -84,8 +84,9 @@ DIST_COMMON = $(top_srcdir)/config/eu.am + $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ + $(include_HEADERS) $(noinst_HEADERS) $(pkginclude_HEADERS) \ + ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap +-@BUILD_STATIC_TRUE@am__append_2 = -fpic ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap ++@BUILD_STATIC_TRUE@am__append_3 = -fpic + @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) + @MUDFLAP_TRUE@am_libdw_pic_a_OBJECTS = + subdir = libdw +@@ -291,6 +292,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -320,6 +322,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = 1 ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -381,10 +384,9 @@ zip_LIBS = @zip_LIBS@ + AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ + -I$(srcdir)/../libelf + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) $(am__append_2) ++ $(am__append_1) $(am__append_2) $(am__append_3) + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ --- elfutils/libdw/dwarf_begin_elf.c +++ elfutils/libdw/dwarf_begin_elf.c @@ -48,6 +48,14 @@ @@ -865,52 +926,9 @@ /* Return attribute code of given attribute. */ __libdw_extern_inline unsigned int dwarf_whatattr (Dwarf_Attribute *attr) ---- elfutils/libdw/Makefile.in -+++ elfutils/libdw/Makefile.in -@@ -39,8 +39,9 @@ host_triplet = @host@ - DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ - $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog --@MUDFLAP_TRUE@am__append_1 = -fmudflap --@BUILD_STATIC_TRUE@am__append_2 = -fpic -+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) -+@MUDFLAP_TRUE@am__append_2 = -fmudflap -+@BUILD_STATIC_TRUE@am__append_3 = -fpic - @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) - @MUDFLAP_TRUE@am_libdw_pic_a_OBJECTS = - subdir = libdw -@@ -192,6 +193,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ - LDFLAGS = @LDFLAGS@ -+LD_AS_NEEDED = @LD_AS_NEEDED@ - LEX = @LEX@ - LEXLIB = @LEXLIB@ - LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -221,6 +223,7 @@ SHELL = @SHELL@ - STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = 1 -+WEXTRA = @WEXTRA@ - XGETTEXT = @XGETTEXT@ - XGETTEXT_015 = @XGETTEXT_015@ - XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -282,10 +285,9 @@ zip_LIBS = @zip_LIBS@ - INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ - -I$(srcdir)/../libelf - AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ -- $($(*F)_no_Werror),,-Werror) $(if \ -- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ -+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ - $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ -- $(am__append_1) $(am__append_2) -+ $(am__append_1) $(am__append_2) $(am__append_3) - @MUDFLAP_FALSE@libmudflap = - @MUDFLAP_TRUE@libmudflap = -lmudflap - COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ --- elfutils/libdwfl/ChangeLog +++ elfutils/libdwfl/ChangeLog -@@ -1420,6 +1420,11 @@ +@@ -1659,6 +1659,11 @@ 2005-07-21 Roland McGrath @@ -924,10 +942,10 @@ * test2.c (main): Check sscanf result to quiet warning. --- elfutils/libdwfl/Makefile.in +++ elfutils/libdwfl/Makefile.in -@@ -38,11 +38,12 @@ host_triplet = @host@ - DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/eu.am ChangeLog +@@ -82,11 +82,12 @@ host_triplet = @host@ + DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ + $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog -@MUDFLAP_TRUE@am__append_1 = -fmudflap -@MUDFLAP_FALSE@am__append_2 = libdwfl_pic.a -@ZLIB_TRUE@am__append_3 = gzip.c @@ -942,7 +960,7 @@ @MUDFLAP_TRUE@am_libdwfl_pic_a_OBJECTS = subdir = libdwfl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -@@ -182,6 +183,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -280,6 +281,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -950,7 +968,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -211,6 +213,7 @@ SHELL = @SHELL@ +@@ -309,6 +311,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = 1 @@ -958,7 +976,7 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -273,10 +276,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi +@@ -371,10 +374,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -I$(srcdir)/../libdw AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ @@ -971,7 +989,7 @@ @MUDFLAP_FALSE@libmudflap = @MUDFLAP_TRUE@libmudflap = -lmudflap COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ -@@ -284,7 +286,7 @@ COMPILE.os = $(filter-out -fprofile-arcs +@@ -382,7 +384,7 @@ COMPILE.os = $(filter-out -fprofile-arcs CLEANFILES = *.gcno *.gcda $(am_libdwfl_pic_a_OBJECTS) textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi @@ -980,7 +998,7 @@ pkginclude_HEADERS = libdwfl.h libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c \ dwfl_version.c dwfl_module.c dwfl_report_elf.c relocate.c \ -@@ -305,8 +307,8 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en +@@ -403,8 +405,8 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en dwfl_module_getsym.c dwfl_module_addrname.c \ dwfl_module_addrsym.c dwfl_module_return_value_location.c \ dwfl_module_register_names.c dwfl_segment_report_module.c \ @@ -993,7 +1011,7 @@ @MUDFLAP_FALSE@libdw = ../libdw/libdw.so --- elfutils/libebl/ChangeLog +++ elfutils/libebl/ChangeLog -@@ -658,6 +658,11 @@ +@@ -674,6 +674,11 @@ * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency tracking works right. @@ -1007,17 +1025,17 @@ * libebl_x86_64.map: Add x86_64_core_note. --- elfutils/libebl/Makefile.in +++ elfutils/libebl/Makefile.in -@@ -38,7 +38,8 @@ host_triplet = @host@ - DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/eu.am ChangeLog +@@ -82,7 +82,8 @@ host_triplet = @host@ + DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ + $(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog -@MUDFLAP_TRUE@am__append_1 = -fmudflap +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) +@MUDFLAP_TRUE@am__append_2 = -fmudflap subdir = libebl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ -@@ -144,6 +145,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -242,6 +243,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -1025,7 +1043,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -173,6 +175,7 @@ SHELL = @SHELL@ +@@ -271,6 +273,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = 1 @@ -1033,7 +1051,7 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -235,10 +238,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi +@@ -333,10 +336,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr -I$(srcdir)/../libelf -I$(srcdir)/../libdw \ -I$(srcdir)/../libasm AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ @@ -1048,7 +1066,7 @@ COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ --- elfutils/libelf/ChangeLog +++ elfutils/libelf/ChangeLog -@@ -34,6 +34,11 @@ +@@ -46,6 +46,11 @@ * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check. @@ -1060,7 +1078,7 @@ 2011-02-26 Mark Wielaard * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini. -@@ -711,6 +716,11 @@ +@@ -723,6 +728,11 @@ * elf.h: Update from glibc. @@ -1072,6 +1090,62 @@ 2005-05-08 Roland McGrath * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now. +--- elfutils/libelf/Makefile.in ++++ elfutils/libelf/Makefile.in +@@ -84,11 +84,12 @@ DIST_COMMON = $(top_srcdir)/config/eu.am + $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ + $(include_HEADERS) $(noinst_HEADERS) $(pkginclude_HEADERS) \ + ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap +-@BUILD_STATIC_TRUE@am__append_2 = -fpic ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap ++@BUILD_STATIC_TRUE@am__append_3 = -fpic + @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) + @MUDFLAP_TRUE@am_libelf_pic_a_OBJECTS = +-@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_3 = -lpthread ++@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_4 = -lpthread + subdir = libelf + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ +@@ -288,6 +289,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -317,6 +319,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = 1 ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -377,10 +380,9 @@ top_srcdir = @top_srcdir@ + zip_LIBS = @zip_LIBS@ + AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) $(am__append_2) ++ $(am__append_1) $(am__append_2) $(am__append_3) + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ +@@ -445,7 +447,7 @@ libelf_a_SOURCES = elf_version.c elf_has + + @MUDFLAP_FALSE@libelf_pic_a_SOURCES = + @MUDFLAP_FALSE@am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os) +-@MUDFLAP_FALSE@libelf_so_LDLIBS = $(am__append_3) ++@MUDFLAP_FALSE@libelf_so_LDLIBS = $(am__append_4) + @MUDFLAP_FALSE@libelf_so_SOURCES = + noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \ + version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h --- elfutils/libelf/common.h +++ elfutils/libelf/common.h @@ -139,7 +139,7 @@ libelf_release_all (Elf *elf) @@ -1112,65 +1186,9 @@ len -= 4; } } ---- elfutils/libelf/Makefile.in -+++ elfutils/libelf/Makefile.in -@@ -39,11 +39,12 @@ host_triplet = @host@ - DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ - $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog --@MUDFLAP_TRUE@am__append_1 = -fmudflap --@BUILD_STATIC_TRUE@am__append_2 = -fpic -+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) -+@MUDFLAP_TRUE@am__append_2 = -fmudflap -+@BUILD_STATIC_TRUE@am__append_3 = -fpic - @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) - @MUDFLAP_TRUE@am_libelf_pic_a_OBJECTS = --@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_3 = -lpthread -+@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_4 = -lpthread - subdir = libelf - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ -@@ -189,6 +190,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ - LDFLAGS = @LDFLAGS@ -+LD_AS_NEEDED = @LD_AS_NEEDED@ - LEX = @LEX@ - LEXLIB = @LEXLIB@ - LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -218,6 +220,7 @@ SHELL = @SHELL@ - STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = 1 -+WEXTRA = @WEXTRA@ - XGETTEXT = @XGETTEXT@ - XGETTEXT_015 = @XGETTEXT_015@ - XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -278,10 +281,9 @@ top_srcdir = @top_srcdir@ - zip_LIBS = @zip_LIBS@ - INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. - AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ -- $($(*F)_no_Werror),,-Werror) $(if \ -- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ -+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ - $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ -- $(am__append_1) $(am__append_2) -+ $(am__append_1) $(am__append_2) $(am__append_3) - @MUDFLAP_FALSE@libmudflap = - @MUDFLAP_TRUE@libmudflap = -lmudflap - COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ -@@ -346,7 +348,7 @@ libelf_a_SOURCES = elf_version.c elf_has - - @MUDFLAP_FALSE@libelf_pic_a_SOURCES = - @MUDFLAP_FALSE@am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os) --@MUDFLAP_FALSE@libelf_so_LDLIBS = $(am__append_3) -+@MUDFLAP_FALSE@libelf_so_LDLIBS = $(am__append_4) - @MUDFLAP_FALSE@libelf_so_SOURCES = - noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \ - version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h --- elfutils/m4/Makefile.in +++ elfutils/m4/Makefile.in -@@ -75,6 +75,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -139,6 +139,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -1178,7 +1196,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -104,6 +105,7 @@ SHELL = @SHELL@ +@@ -168,6 +169,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -1186,42 +1204,9 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ ---- elfutils/Makefile.in -+++ elfutils/Makefile.in -@@ -155,6 +155,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ - LDFLAGS = @LDFLAGS@ -+LD_AS_NEEDED = @LD_AS_NEEDED@ - LEX = @LEX@ - LEXLIB = @LEXLIB@ - LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -184,6 +185,7 @@ SHELL = @SHELL@ - STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ -+WEXTRA = @WEXTRA@ - XGETTEXT = @XGETTEXT@ - XGETTEXT_015 = @XGETTEXT_015@ - XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ ---- elfutils/src/addr2line.c -+++ elfutils/src/addr2line.c -@@ -447,10 +447,10 @@ handle_address (const char *string, Dwfl - bool parsed = false; - int i, j; - char *name = NULL; -- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 -+ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 - && string[i] == '\0') - parsed = adjust_to_section (name, &addr, dwfl); -- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) -+ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) - { - default: - break; --- elfutils/src/ChangeLog +++ elfutils/src/ChangeLog -@@ -606,8 +606,16 @@ +@@ -766,8 +766,16 @@ * readelf.c (attr_callback): Use print_block only when we don't use print_ops. @@ -1238,7 +1223,7 @@ * ar.c (do_oper_extract): Use pathconf instead of statfs. 2009-08-01 Ulrich Drepper -@@ -771,6 +779,8 @@ +@@ -931,6 +939,8 @@ * readelf.c (print_debug_frame_section): Use t instead of j formats for ptrdiff_t OFFSET. @@ -1247,7 +1232,7 @@ 2009-01-21 Ulrich Drepper * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section -@@ -954,6 +964,11 @@ +@@ -1114,6 +1124,11 @@ that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really is valid in RELRO. @@ -1259,7 +1244,7 @@ 2008-02-29 Roland McGrath * readelf.c (print_attributes): Add a cast. -@@ -1205,6 +1220,8 @@ +@@ -1365,6 +1380,8 @@ * readelf.c (hex_dump): Fix rounding error in whitespace calculation. @@ -1268,7 +1253,7 @@ 2007-10-15 Roland McGrath * make-debug-archive.in: New file. -@@ -1644,6 +1661,10 @@ +@@ -1804,6 +1821,10 @@ * elflint.c (valid_e_machine): Add EM_ALPHA. Reported by Christian Aichinger . @@ -1279,7 +1264,7 @@ 2006-08-08 Ulrich Drepper * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB. -@@ -1720,6 +1741,10 @@ +@@ -1880,6 +1901,10 @@ * Makefile.am: Add hacks to create dependency files for non-generic linker. @@ -1290,7 +1275,7 @@ 2006-06-12 Ulrich Drepper * ldgeneric.c (ld_generic_generate_sections): Don't create .interp -@@ -2068,6 +2093,11 @@ +@@ -2228,6 +2253,11 @@ * readelf.c (print_debug_loc_section): Fix indentation for larger address size. @@ -1302,6 +1287,125 @@ 2005-05-30 Roland McGrath * readelf.c (print_debug_line_section): Print section offset of each +--- elfutils/src/Makefile.am ++++ elfutils/src/Makefile.am +@@ -95,6 +95,9 @@ addr2line_no_Wformat = yes + # XXX While the file is not finished, don't warn about this + ldgeneric_no_Wunused = yes + ++# Buggy old compilers. ++readelf_no_Werror = yes ++ + readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl + nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ + $(demanglelib) +--- elfutils/src/Makefile.in ++++ elfutils/src/Makefile.in +@@ -85,7 +85,8 @@ DIST_COMMON = $(top_srcdir)/config/eu.am + $(srcdir)/Makefile.am ldlex.c ldscript.c \ + $(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \ + $(noinst_HEADERS) ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap + bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEEXT) size$(EXEEXT) \ + strip$(EXEEXT) ld$(EXEEXT) elflint$(EXEEXT) \ + findtextrel$(EXEEXT) addr2line$(EXEEXT) elfcmp$(EXEEXT) \ +@@ -94,9 +95,9 @@ bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEE + @NATIVE_LD_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) + # We never build this library but we need to get the dependency files + # of all the linker backends that might be used in a non-generic linker. +-@NEVER_TRUE@am__append_2 = libdummy.a ++@NEVER_TRUE@am__append_3 = libdummy.a + # -ldl is always needed for libebl. +-@NATIVE_LD_TRUE@am__append_3 = libld_elf.a ++@NATIVE_LD_TRUE@am__append_4 = libld_elf.a + @NATIVE_LD_TRUE@am_libld_elf_i386_pic_a_OBJECTS = + subdir = src + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +@@ -164,7 +165,7 @@ am_ld_OBJECTS = ld.$(OBJEXT) ldgeneric.$ + versionhash.$(OBJEXT) + ld_OBJECTS = $(am_ld_OBJECTS) + ld_DEPENDENCIES = $(libebl) $(libelf) $(libeu) $(am__DEPENDENCIES_1) \ +- $(am__append_3) ++ $(am__append_4) + ld_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ld_LDFLAGS) $(LDFLAGS) -o \ + $@ + am_libld_elf_i386_so_OBJECTS = +@@ -338,6 +339,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -367,6 +369,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -430,10 +433,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr + -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \ + -I$(srcdir)/../libasm + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) ++ $(am__append_1) $(am__append_2) + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ +@@ -449,8 +451,8 @@ AM_LFLAGS = -Pld -olex.yy.c + native_ld = @native_ld@ + ld_dsos = libld_elf_i386_pic.a + @NATIVE_LD_FALSE@noinst_LIBRARIES = libld_elf.a libar.a $(ld_dsos) \ +-@NATIVE_LD_FALSE@ $(am__append_2) +-@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_2) ++@NATIVE_LD_FALSE@ $(am__append_3) ++@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_3) + @NATIVE_LD_TRUE@native_ld_cflags = -DBASE_ELF_NAME=elf_$(base_cpu) + @NEVER_TRUE@libdummy_a_SOURCES = i386_ld.c + ld_SOURCES = ld.c ldgeneric.c ldlex.l ldscript.y symbolhash.c sectionhash.c \ +@@ -479,6 +481,9 @@ strings_no_Wformat = yes + addr2line_no_Wformat = yes + # XXX While the file is not finished, don't warn about this + ldgeneric_no_Wunused = yes ++ ++# Buggy old compilers. ++readelf_no_Werror = yes + readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl + nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ + $(demanglelib) +@@ -486,7 +491,7 @@ nm_LDADD = $(libdw) $(libebl) $(libelf) + size_LDADD = $(libelf) $(libeu) $(libmudflap) + strip_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl + ld_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ +- $(am__append_3) ++ $(am__append_4) + ld_LDFLAGS = -rdynamic + elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl + findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap) +--- elfutils/src/addr2line.c ++++ elfutils/src/addr2line.c +@@ -448,10 +448,10 @@ handle_address (const char *string, Dwfl + bool parsed = false; + int i, j; + char *name = NULL; +- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 ++ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 + && string[i] == '\0') + parsed = adjust_to_section (name, &addr, dwfl); +- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) ++ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) + { + default: + break; --- elfutils/src/findtextrel.c +++ elfutils/src/findtextrel.c @@ -496,7 +496,11 @@ ptrcompare (const void *p1, const void * @@ -1334,117 +1438,14 @@ +#endif /* Optimizing and not GCC 4.2. */ #endif /* ld.h */ ---- elfutils/src/Makefile.am -+++ elfutils/src/Makefile.am -@@ -95,6 +95,9 @@ addr2line_no_Wformat = yes - # XXX While the file is not finished, don't warn about this - ldgeneric_no_Wunused = yes - -+# Buggy old compilers. -+readelf_no_Werror = yes -+ - readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl - nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ - $(demanglelib) ---- elfutils/src/Makefile.in -+++ elfutils/src/Makefile.in -@@ -40,7 +40,8 @@ host_triplet = @host@ - DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog \ - ldlex.c ldscript.c --@MUDFLAP_TRUE@am__append_1 = -fmudflap -+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) -+@MUDFLAP_TRUE@am__append_2 = -fmudflap - bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEEXT) size$(EXEEXT) \ - strip$(EXEEXT) ld$(EXEEXT) elflint$(EXEEXT) \ - findtextrel$(EXEEXT) addr2line$(EXEEXT) elfcmp$(EXEEXT) \ -@@ -49,9 +50,9 @@ bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEE - @NATIVE_LD_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) - # We never build this library but we need to get the dependency files - # of all the linker backends that might be used in a non-generic linker. --@NEVER_TRUE@am__append_2 = libdummy.a -+@NEVER_TRUE@am__append_3 = libdummy.a - # -ldl is always needed for libebl. --@NATIVE_LD_TRUE@am__append_3 = libld_elf.a -+@NATIVE_LD_TRUE@am__append_4 = libld_elf.a - @NATIVE_LD_TRUE@am_libld_elf_i386_pic_a_OBJECTS = - subdir = src - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -@@ -115,7 +116,7 @@ am_ld_OBJECTS = ld.$(OBJEXT) ldgeneric.$ - versionhash.$(OBJEXT) - ld_OBJECTS = $(am_ld_OBJECTS) - ld_DEPENDENCIES = $(libebl) $(libelf) $(libeu) $(am__DEPENDENCIES_1) \ -- $(am__append_3) -+ $(am__append_4) - ld_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ld_LDFLAGS) $(LDFLAGS) -o \ - $@ - am_libld_elf_i386_so_OBJECTS = -@@ -229,6 +230,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ - LDFLAGS = @LDFLAGS@ -+LD_AS_NEEDED = @LD_AS_NEEDED@ - LEX = @LEX@ - LEXLIB = @LEXLIB@ - LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -258,6 +260,7 @@ SHELL = @SHELL@ - STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ -+WEXTRA = @WEXTRA@ - XGETTEXT = @XGETTEXT@ - XGETTEXT_015 = @XGETTEXT_015@ - XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -321,10 +324,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi - -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \ - -I$(srcdir)/../libasm - AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ -- $($(*F)_no_Werror),,-Werror) $(if \ -- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ -+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ - $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ -- $(am__append_1) -+ $(am__append_1) $(am__append_2) - @MUDFLAP_FALSE@libmudflap = - @MUDFLAP_TRUE@libmudflap = -lmudflap - COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ -@@ -340,8 +342,8 @@ AM_LFLAGS = -Pld -olex.yy.c - native_ld = @native_ld@ - ld_dsos = libld_elf_i386_pic.a - @NATIVE_LD_FALSE@noinst_LIBRARIES = libld_elf.a libar.a $(ld_dsos) \ --@NATIVE_LD_FALSE@ $(am__append_2) --@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_2) -+@NATIVE_LD_FALSE@ $(am__append_3) -+@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_3) - @NATIVE_LD_TRUE@native_ld_cflags = -DBASE_ELF_NAME=elf_$(base_cpu) - @NEVER_TRUE@libdummy_a_SOURCES = i386_ld.c - ld_SOURCES = ld.c ldgeneric.c ldlex.l ldscript.y symbolhash.c sectionhash.c \ -@@ -370,6 +372,9 @@ strings_no_Wformat = yes - addr2line_no_Wformat = yes - # XXX While the file is not finished, don't warn about this - ldgeneric_no_Wunused = yes -+ -+# Buggy old compilers. -+readelf_no_Werror = yes - readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl - nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ - $(demanglelib) -@@ -377,7 +382,7 @@ nm_LDADD = $(libdw) $(libebl) $(libelf) - size_LDADD = $(libelf) $(libeu) $(libmudflap) - strip_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl - ld_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ -- $(am__append_3) -+ $(am__append_4) - ld_LDFLAGS = -rdynamic - elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl - findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap) --- elfutils/src/readelf.c +++ elfutils/src/readelf.c -@@ -3949,10 +3949,11 @@ struct listptr - #define listptr_offset_size(p) ((p)->dwarf64 ? 8 : 4) - #define listptr_address_size(p) ((p)->addr64 ? 8 : 4) +@@ -4170,10 +4170,12 @@ listptr_base (struct listptr *p) + return base; + } +static const char *listptr_name; ++ static int -compare_listptr (const void *a, const void *b, void *arg) +compare_listptr (const void *a, const void *b) @@ -1454,7 +1455,7 @@ struct listptr *p1 = (void *) a; struct listptr *p2 = (void *) b; -@@ -4033,8 +4034,11 @@ static void +@@ -4262,8 +4264,11 @@ static void sort_listptr (struct listptr_table *table, const char *name) { if (table->n > 0) @@ -1468,7 +1469,7 @@ } static bool -@@ -8442,7 +8446,7 @@ dump_archive_index (Elf *elf, const char +@@ -8986,7 +8991,7 @@ dump_archive_index (Elf *elf, const char if (unlikely (elf_rand (elf, as_off) == 0) || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf)) == NULL)) @@ -1550,7 +1551,7 @@ } /* Open the file. */ -@@ -2055,7 +2071,7 @@ while computing checksum for debug infor +@@ -2060,7 +2076,7 @@ while computing checksum for debug infor /* If requested, preserve the timestamp. */ if (tvp != NULL) { @@ -1559,7 +1560,7 @@ { error (0, errno, gettext ("\ cannot set access and modification date of '%s'"), -@@ -2112,7 +2128,7 @@ handle_ar (int fd, Elf *elf, const char +@@ -2117,7 +2133,7 @@ handle_ar (int fd, Elf *elf, const char if (tvp != NULL) { @@ -1570,7 +1571,7 @@ cannot set access and modification date of '%s'"), fname); --- elfutils/tests/ChangeLog +++ elfutils/tests/ChangeLog -@@ -439,6 +439,8 @@ +@@ -652,6 +652,8 @@ 2008-01-21 Roland McGrath @@ -1579,7 +1580,7 @@ * testfile45.S.bz2: Add tests for cltq, cqto. * testfile45.expect.bz2: Adjust. -@@ -1147,6 +1149,11 @@ +@@ -1360,6 +1362,11 @@ * Makefile.am (TESTS): Add run-elflint-test.sh. (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2. @@ -1591,23 +1592,12 @@ 2005-05-24 Ulrich Drepper * get-files.c (main): Use correct format specifier. ---- elfutils/tests/line2addr.c -+++ elfutils/tests/line2addr.c -@@ -124,7 +124,7 @@ main (int argc, char *argv[]) - { - struct args a = { .arg = argv[cnt] }; - -- switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line)) -+ switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line)) - { - default: - case 0: --- elfutils/tests/Makefile.in +++ elfutils/tests/Makefile.in -@@ -35,14 +35,15 @@ build_triplet = @build@ - host_triplet = @host@ - DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/eu.am ChangeLog +@@ -80,14 +80,15 @@ host_triplet = @host@ + DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver ChangeLog -@MUDFLAP_TRUE@am__append_1 = -fmudflap -@STANDALONE_FALSE@am__append_2 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) @@ -1624,24 +1614,28 @@ check_PROGRAMS = arextract$(EXEEXT) arsymtest$(EXEEXT) \ newfile$(EXEEXT) saridx$(EXEEXT) scnnames$(EXEEXT) \ sectiondump$(EXEEXT) showptable$(EXEEXT) update1$(EXEEXT) \ -@@ -92,12 +93,12 @@ TESTS = run-arextract.sh run-arsymtest.s - run-readelf-gdb_index.sh run-unstrip-n.sh run-low_high_pc.sh \ +@@ -140,14 +141,14 @@ TESTS = run-arextract.sh run-arsymtest.s run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \ - run-test-archive64.sh $(am__EXEEXT_1) $(am__EXEEXT_3) \ -- $(am__append_9) + run-test-archive64.sh run-readelf-vmcoreinfo.sh \ + run-readelf-mixed-corenote.sh run-dwfllines.sh \ +- run-dwfl-report-elf-align.sh $(am__EXEEXT_1) $(am__append_7) \ +- $(am__EXEEXT_3) $(am__append_10) -@STANDALONE_FALSE@am__append_5 = msg_tst md5-sha1-test -+ $(am__append_10) ++ run-dwfl-report-elf-align.sh $(am__EXEEXT_1) $(am__append_8) \ ++ $(am__EXEEXT_3) $(am__append_11) @STANDALONE_FALSE@am__append_6 = msg_tst md5-sha1-test --@HAVE_LIBASM_TRUE@am__append_7 = $(asm_TESTS) +-@LZMA_TRUE@am__append_7 = run-readelf-s.sh run-dwflsyms.sh +-@HAVE_LIBASM_TRUE@am__append_8 = $(asm_TESTS) +@STANDALONE_FALSE@am__append_7 = msg_tst md5-sha1-test - @HAVE_LIBASM_TRUE@am__append_8 = $(asm_TESTS) --@ENABLE_DWZ_TRUE@am__append_9 = run-readelf-dwz-multi.sh -+@HAVE_LIBASM_TRUE@am__append_9 = $(asm_TESTS) -+@ENABLE_DWZ_TRUE@am__append_10 = run-readelf-dwz-multi.sh ++@LZMA_TRUE@am__append_8 = run-readelf-s.sh run-dwflsyms.sh + @HAVE_LIBASM_TRUE@am__append_9 = $(asm_TESTS) +-@ENABLE_DWZ_TRUE@am__append_10 = run-readelf-dwz-multi.sh ++@HAVE_LIBASM_TRUE@am__append_10 = $(asm_TESTS) ++@ENABLE_DWZ_TRUE@am__append_11 = run-readelf-dwz-multi.sh subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ -@@ -412,6 +413,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -722,6 +723,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -1649,7 +1643,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -441,6 +443,7 @@ SHELL = @SHELL@ +@@ -751,6 +753,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -1657,12 +1651,12 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -499,12 +502,11 @@ top_build_prefix = @top_build_prefix@ +@@ -809,12 +812,11 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zip_LIBS = @zip_LIBS@ --INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2) -+INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_3) +-AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2) ++AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_3) AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ - $($(*F)_no_Werror),,-Werror) $(if \ - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ @@ -1673,7 +1667,7 @@ @MUDFLAP_FALSE@libmudflap = @MUDFLAP_TRUE@libmudflap = -lmudflap COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ -@@ -514,7 +516,7 @@ CLEANFILES = *.gcno *.gcda +@@ -824,7 +826,7 @@ CLEANFILES = *.gcno *.gcda textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi @MUDFLAP_FALSE@BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf @MUDFLAP_TRUE@BUILD_RPATH = \$$ORIGIN/../backends @@ -1682,3 +1676,14 @@ @TESTS_RPATH_FALSE@tests_rpath = no @TESTS_RPATH_TRUE@tests_rpath = yes asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \ +--- elfutils/tests/line2addr.c ++++ elfutils/tests/line2addr.c +@@ -124,7 +124,7 @@ main (int argc, char *argv[]) + { + struct args a = { .arg = argv[cnt] }; + +- switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line)) ++ switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line)) + { + default: + case 0: diff --git a/elfutils-robustify.patch b/elfutils-robustify.patch index 9eee984..fa43af2 100644 --- a/elfutils-robustify.patch +++ b/elfutils-robustify.patch @@ -1,6 +1,6 @@ --- elfutils/libdwfl/ChangeLog +++ elfutils/libdwfl/ChangeLog -@@ -52,6 +52,11 @@ +@@ -291,6 +291,11 @@ * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL. Reported by Kurt Roeckx . @@ -21,7 +21,7 @@ This file is part of elfutils. This file is free software; you can redistribute it and/or modify -@@ -457,7 +457,10 @@ relocate_section (Dwfl_Module *mod, Elf +@@ -456,7 +456,10 @@ relocate_section (Dwfl_Module *mod, Elf } } @@ -33,7 +33,7 @@ size_t complete = 0; if (shdr->sh_type == SHT_REL) for (size_t relidx = 0; !result && relidx < nrels; ++relidx) -@@ -559,7 +562,7 @@ relocate_section (Dwfl_Module *mod, Elf +@@ -558,7 +561,7 @@ relocate_section (Dwfl_Module *mod, Elf nrels = next; } @@ -44,7 +44,7 @@ --- elfutils/libelf/ChangeLog +++ elfutils/libelf/ChangeLog -@@ -703,10 +703,53 @@ +@@ -715,10 +715,53 @@ 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. @@ -253,7 +253,7 @@ --- elfutils/libelf/elf_getarsym.c +++ elfutils/libelf/elf_getarsym.c -@@ -181,6 +181,9 @@ elf_getarsym (elf, ptr) +@@ -183,6 +183,9 @@ elf_getarsym (elf, ptr) size_t index_size = atol (tmpbuf); if (SARMAG + sizeof (struct ar_hdr) + index_size > elf->maximum_size @@ -408,46 +408,6 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; ---- elfutils/libelf/gelf_getrela.c -+++ elfutils/libelf/gelf_getrela.c -@@ -1,5 +1,5 @@ - /* Get RELA relocation information at given index. -- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. -+ Copyright (C) 2000-2009 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper , 2000. - -@@ -50,12 +50,6 @@ gelf_getrela (data, ndx, dst) - if (data_scn == NULL) - return NULL; - -- if (unlikely (ndx < 0)) -- { -- __libelf_seterrno (ELF_E_INVALID_INDEX); -- return NULL; -- } -- - if (unlikely (data_scn->d.d_type != ELF_T_RELA)) - { - __libelf_seterrno (ELF_E_INVALID_HANDLE); -@@ -72,7 +66,7 @@ gelf_getrela (data, ndx, dst) - if (scn->elf->class == ELFCLASS32) - { - /* We have to convert the data. */ -- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size)) -+ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d)) - { - __libelf_seterrno (ELF_E_INVALID_INDEX); - result = NULL; -@@ -93,7 +87,7 @@ gelf_getrela (data, ndx, dst) - { - /* Simply copy the data after we made sure we are actually getting - correct data. */ -- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size)) -+ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d)) - { - __libelf_seterrno (ELF_E_INVALID_INDEX); - result = NULL; --- elfutils/libelf/gelf_getrel.c +++ elfutils/libelf/gelf_getrel.c @@ -1,5 +1,5 @@ @@ -488,6 +448,46 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); result = NULL; +--- elfutils/libelf/gelf_getrela.c ++++ elfutils/libelf/gelf_getrela.c +@@ -1,5 +1,5 @@ + /* Get RELA relocation information at given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -50,12 +50,6 @@ gelf_getrela (data, ndx, dst) + if (data_scn == NULL) + return NULL; + +- if (unlikely (ndx < 0)) +- { +- __libelf_seterrno (ELF_E_INVALID_INDEX); +- return NULL; +- } +- + if (unlikely (data_scn->d.d_type != ELF_T_RELA)) + { + __libelf_seterrno (ELF_E_INVALID_HANDLE); +@@ -72,7 +66,7 @@ gelf_getrela (data, ndx, dst) + if (scn->elf->class == ELFCLASS32) + { + /* We have to convert the data. */ +- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + result = NULL; +@@ -93,7 +87,7 @@ gelf_getrela (data, ndx, dst) + { + /* Simply copy the data after we made sure we are actually getting + correct data. */ +- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + result = NULL; --- elfutils/libelf/gelf_getsym.c +++ elfutils/libelf/gelf_getsym.c @@ -1,5 +1,5 @@ @@ -678,46 +678,6 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); return 0; ---- elfutils/libelf/gelf_update_rela.c -+++ elfutils/libelf/gelf_update_rela.c -@@ -1,5 +1,5 @@ - /* Update RELA relocation information at given index. -- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. -+ Copyright (C) 2000-2009 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper , 2000. - -@@ -47,12 +47,6 @@ gelf_update_rela (Elf_Data *dst, int ndx - if (dst == NULL) - return 0; - -- if (unlikely (ndx < 0)) -- { -- __libelf_seterrno (ELF_E_INVALID_INDEX); -- return 0; -- } -- - if (unlikely (data_scn->d.d_type != ELF_T_RELA)) - { - /* The type of the data better should match. */ -@@ -80,7 +74,7 @@ gelf_update_rela (Elf_Data *dst, int ndx - } - - /* Check whether we have to resize the data buffer. */ -- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size)) -+ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d)) - { - __libelf_seterrno (ELF_E_INVALID_INDEX); - goto out; -@@ -96,7 +90,7 @@ gelf_update_rela (Elf_Data *dst, int ndx - else - { - /* Check whether we have to resize the data buffer. */ -- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size)) -+ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d)) - { - __libelf_seterrno (ELF_E_INVALID_INDEX); - goto out; --- elfutils/libelf/gelf_update_rel.c +++ elfutils/libelf/gelf_update_rel.c @@ -1,5 +1,5 @@ @@ -758,6 +718,46 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; +--- elfutils/libelf/gelf_update_rela.c ++++ elfutils/libelf/gelf_update_rela.c +@@ -1,5 +1,5 @@ + /* Update RELA relocation information at given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -47,12 +47,6 @@ gelf_update_rela (Elf_Data *dst, int ndx + if (dst == NULL) + return 0; + +- if (unlikely (ndx < 0)) +- { +- __libelf_seterrno (ELF_E_INVALID_INDEX); +- return 0; +- } +- + if (unlikely (data_scn->d.d_type != ELF_T_RELA)) + { + /* The type of the data better should match. */ +@@ -80,7 +74,7 @@ gelf_update_rela (Elf_Data *dst, int ndx + } + + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +@@ -96,7 +90,7 @@ gelf_update_rela (Elf_Data *dst, int ndx + else + { + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; --- elfutils/libelf/gelf_update_sym.c +++ elfutils/libelf/gelf_update_sym.c @@ -1,5 +1,5 @@ @@ -902,7 +902,7 @@ #endif /* libelfP.h */ --- elfutils/src/ChangeLog +++ elfutils/src/ChangeLog -@@ -344,6 +344,12 @@ +@@ -504,6 +504,12 @@ * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature. @@ -915,7 +915,7 @@ 2011-02-11 Roland McGrath * elfcmp.c (verbose): New variable. -@@ -2056,6 +2062,16 @@ +@@ -2216,6 +2222,16 @@ object symbols or symbols with unknown type. (check_rel): Likewise. @@ -932,7 +932,7 @@ 2005-06-08 Roland McGrath * readelf.c (print_ops): Add consts. -@@ -2101,6 +2117,19 @@ +@@ -2261,6 +2277,19 @@ * readelf.c (dwarf_tag_string): Add new tags. @@ -1027,7 +1027,7 @@ } if (sym->st_shndx == SHN_XINDEX) -@@ -1032,9 +1042,11 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e +@@ -1040,9 +1050,11 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e { GElf_Shdr rcshdr_mem; const GElf_Shdr *rcshdr = gelf_getshdr (scn, &rcshdr_mem); @@ -1041,7 +1041,7 @@ { /* Found the dynamic section. Look through it. */ Elf_Data *d = elf_getdata (scn, NULL); -@@ -1044,7 +1056,9 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e +@@ -1052,7 +1064,9 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e { GElf_Dyn dyn_mem; GElf_Dyn *dyn = gelf_getdyn (d, cnt, &dyn_mem); @@ -1052,7 +1052,7 @@ if (dyn->d_tag == DT_RELCOUNT) { -@@ -1058,7 +1072,9 @@ section [%2d] '%s': DT_RELCOUNT used for +@@ -1066,7 +1080,9 @@ section [%2d] '%s': DT_RELCOUNT used for /* Does the number specified number of relative relocations exceed the total number of relocations? */ @@ -1063,7 +1063,7 @@ ERROR (gettext ("\ section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"), idx, section_name (ebl, idx), -@@ -1218,7 +1234,8 @@ section [%2d] '%s': no relocations for m +@@ -1226,7 +1242,8 @@ section [%2d] '%s': no relocations for m } } @@ -1073,7 +1073,7 @@ 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_Rel\n"), -@@ -1441,7 +1458,8 @@ check_rela (Ebl *ebl, GElf_Ehdr *ehdr, G +@@ -1449,7 +1466,8 @@ check_rela (Ebl *ebl, GElf_Ehdr *ehdr, G Elf_Data *symdata = elf_getdata (symscn, NULL); enum load_state state = state_undecided; @@ -1083,7 +1083,7 @@ { GElf_Rela rela_mem; GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem); -@@ -1491,7 +1509,8 @@ check_rel (Ebl *ebl, GElf_Ehdr *ehdr, GE +@@ -1499,7 +1517,8 @@ check_rel (Ebl *ebl, GElf_Ehdr *ehdr, GE Elf_Data *symdata = elf_getdata (symscn, NULL); enum load_state state = state_undecided; @@ -1093,7 +1093,7 @@ { GElf_Rel rel_mem; GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem); -@@ -1590,7 +1609,8 @@ section [%2d] '%s': referenced as string +@@ -1598,7 +1617,8 @@ section [%2d] '%s': referenced as string shdr->sh_link, section_name (ebl, shdr->sh_link), idx, section_name (ebl, idx)); @@ -1103,7 +1103,7 @@ ERROR (gettext ("\ section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"), idx, section_name (ebl, idx)); -@@ -1600,7 +1620,7 @@ section [%2d] '%s': section entry size d +@@ -1608,7 +1628,7 @@ section [%2d] '%s': section entry size d idx, section_name (ebl, idx)); bool non_null_warned = false; @@ -1112,7 +1112,7 @@ { GElf_Dyn dyn_mem; GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem); -@@ -1872,6 +1892,8 @@ section [%2d] '%s': entry size does not +@@ -1880,6 +1900,8 @@ section [%2d] '%s': entry size does not idx, section_name (ebl, idx)); if (symshdr != NULL @@ -1121,7 +1121,7 @@ && (shdr->sh_size / shdr->sh_entsize < symshdr->sh_size / symshdr->sh_entsize)) ERROR (gettext ("\ -@@ -1898,6 +1920,12 @@ section [%2d] '%s': extended section ind +@@ -1906,6 +1928,12 @@ section [%2d] '%s': extended section ind } Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL); @@ -1134,7 +1134,7 @@ if (*((Elf32_Word *) data->d_buf) != 0) ERROR (gettext ("symbol 0 should have zero extended section index\n")); -@@ -1940,7 +1968,7 @@ section [%2d] '%s': hash table section i +@@ -1948,7 +1976,7 @@ section [%2d] '%s': hash table section i size_t maxidx = nchain; @@ -1143,7 +1143,7 @@ { size_t symsize = symshdr->sh_size / symshdr->sh_entsize; -@@ -1951,18 +1979,28 @@ section [%2d] '%s': hash table section i +@@ -1959,18 +1987,28 @@ section [%2d] '%s': hash table section i maxidx = symsize; } @@ -1174,7 +1174,7 @@ } -@@ -1992,18 +2030,28 @@ section [%2d] '%s': hash table section i +@@ -2000,18 +2038,28 @@ section [%2d] '%s': hash table section i maxidx = symsize; } @@ -1206,7 +1206,7 @@ } -@@ -2028,7 +2076,7 @@ section [%2d] '%s': bitmask size not pow +@@ -2036,7 +2084,7 @@ section [%2d] '%s': bitmask size not pow if (shdr->sh_size < (4 + bitmask_words + nbuckets) * sizeof (Elf32_Word)) { ERROR (gettext ("\ @@ -1215,7 +1215,7 @@ idx, section_name (ebl, idx), (long int) shdr->sh_size, (long int) ((4 + bitmask_words + nbuckets) * sizeof (Elf32_Word))); return; -@@ -2700,8 +2748,9 @@ section [%2d] '%s' refers in sh_link to +@@ -2708,8 +2756,9 @@ section [%2d] '%s' refers in sh_link to /* The number of elements in the version symbol table must be the same as the number of symbols. */ @@ -1229,7 +1229,7 @@ idx, section_name (ebl, idx), --- elfutils/src/readelf.c +++ elfutils/src/readelf.c -@@ -1189,6 +1189,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G +@@ -1363,6 +1363,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G Elf32_Word *grpref = (Elf32_Word *) data->d_buf; GElf_Sym sym_mem; @@ -1238,7 +1238,7 @@ printf ((grpref[0] & GRP_COMDAT) ? ngettext ("\ \nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n", -@@ -1201,8 +1203,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G +@@ -1375,8 +1377,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G data->d_size / sizeof (Elf32_Word) - 1), elf_ndxscn (scn), elf_strptr (ebl->elf, shstrndx, shdr->sh_name), @@ -1249,7 +1249,7 @@ ?: gettext (""), data->d_size / sizeof (Elf32_Word) - 1); -@@ -1353,10 +1355,12 @@ static void +@@ -1527,10 +1529,12 @@ static void handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) { int class = gelf_getclass (ebl->elf); @@ -1263,7 +1263,7 @@ /* Get the data of the section. */ data = elf_getdata (scn, NULL); -@@ -1368,21 +1372,26 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn, +@@ -1542,21 +1546,26 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn, error (EXIT_FAILURE, 0, gettext ("cannot get section header string table index")); @@ -1296,7 +1296,7 @@ { GElf_Dyn dynmem; GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dynmem); -@@ -1531,7 +1540,8 @@ static void +@@ -1705,7 +1714,8 @@ static void handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr) { int class = gelf_getclass (ebl->elf); @@ -1306,7 +1306,7 @@ /* Get the data of the section. */ Elf_Data *data = elf_getdata (scn, NULL); -@@ -1717,7 +1727,8 @@ static void +@@ -1891,7 +1901,8 @@ static void handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr) { int class = gelf_getclass (ebl->elf); @@ -1316,7 +1316,7 @@ /* Get the data of the section. */ Elf_Data *data = elf_getdata (scn, NULL); -@@ -1964,6 +1975,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G +@@ -2138,6 +2149,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G error (EXIT_FAILURE, 0, gettext ("cannot get section header string table index")); @@ -1330,7 +1330,7 @@ /* Now we can compute the number of entries in the section. */ unsigned int nsyms = data->d_size / (class == ELFCLASS32 ? sizeof (Elf32_Sym) -@@ -1974,15 +1992,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G +@@ -2148,15 +2166,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G nsyms), (unsigned int) elf_ndxscn (scn), elf_strptr (ebl->elf, shstrndx, shdr->sh_name), nsyms); @@ -1347,7 +1347,7 @@ fputs_unlocked (class == ELFCLASS32 ? gettext ("\ -@@ -2218,7 +2233,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, +@@ -2392,7 +2407,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, error (EXIT_FAILURE, 0, gettext ("cannot get section header string table index")); @@ -1362,7 +1362,7 @@ printf (ngettext ("\ \nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", "\ -@@ -2229,9 +2250,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, +@@ -2403,9 +2424,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, class == ELFCLASS32 ? 10 : 18, shdr->sh_addr, shdr->sh_offset, (unsigned int) shdr->sh_link, @@ -1373,7 +1373,7 @@ unsigned int offset = 0; for (int cnt = shdr->sh_info; --cnt >= 0; ) -@@ -2284,8 +2303,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G +@@ -2458,8 +2477,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G error (EXIT_FAILURE, 0, gettext ("cannot get section header string table index")); @@ -1389,7 +1389,7 @@ printf (ngettext ("\ \nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", "\ -@@ -2297,9 +2322,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G +@@ -2471,9 +2496,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G class == ELFCLASS32 ? 10 : 18, shdr->sh_addr, shdr->sh_offset, (unsigned int) shdr->sh_link, @@ -1400,7 +1400,7 @@ unsigned int offset = 0; for (int cnt = shdr->sh_info; --cnt >= 0; ) -@@ -2561,25 +2584,30 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G +@@ -2735,25 +2758,30 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G filename = NULL; } @@ -1438,7 +1438,7 @@ { if (cnt % 2 == 0) printf ("\n %4d:", cnt); -@@ -2628,7 +2656,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, +@@ -2802,7 +2830,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt) ++counts[lengths[cnt]]; @@ -1457,7 +1457,7 @@ 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", "\ -@@ -2641,9 +2679,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, +@@ -2815,9 +2853,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, shdr->sh_addr, shdr->sh_offset, (unsigned int) shdr->sh_link, @@ -1468,7 +1468,7 @@ if (extrastr != NULL) fputs (extrastr, stdout); -@@ -2903,7 +2939,8 @@ print_liblist (Ebl *ebl) +@@ -3077,7 +3113,8 @@ print_liblist (Ebl *ebl) if (shdr != NULL && shdr->sh_type == SHT_GNU_LIBLIST) { @@ -1478,7 +1478,7 @@ printf (ngettext ("\ \nLibrary list section [%2zu] '%s' at offset %#0" PRIx64 " contains %d entry:\n", "\ -@@ -4164,6 +4201,16 @@ print_debug_aranges_section (Dwfl_Module +@@ -4397,6 +4434,16 @@ print_decoded_aranges_section (Ebl *ebl, return; } @@ -1497,7 +1497,7 @@ "\ --- elfutils/src/strip.c +++ elfutils/src/strip.c -@@ -564,6 +564,11 @@ handle_elf (int fd, Elf *elf, const char +@@ -565,6 +565,11 @@ handle_elf (int fd, Elf *elf, const char goto fail_close; } @@ -1509,7 +1509,7 @@ /* Storage for section information. We leave room for two more entries since we unconditionally create a section header string table. Maybe some weird tool created an ELF file without one. -@@ -585,7 +590,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -586,7 +591,7 @@ handle_elf (int fd, Elf *elf, const char { /* This should always be true (i.e., there should not be any holes in the numbering). */ @@ -1518,7 +1518,7 @@ shdr_info[cnt].scn = scn; -@@ -598,6 +603,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -599,6 +604,7 @@ handle_elf (int fd, Elf *elf, const char shdr_info[cnt].shdr.sh_name); if (shdr_info[cnt].name == NULL) { @@ -1526,7 +1526,7 @@ error (0, 0, gettext ("illformed file '%s'"), fname); goto fail_close; } -@@ -607,6 +613,8 @@ handle_elf (int fd, Elf *elf, const char +@@ -608,6 +614,8 @@ handle_elf (int fd, Elf *elf, const char /* Remember the shdr.sh_link value. */ shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link; @@ -1535,7 +1535,7 @@ /* Sections in files other than relocatable object files which are not loaded can be freely moved by us. In relocatable -@@ -619,7 +627,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -620,7 +628,7 @@ handle_elf (int fd, Elf *elf, const char appropriate reference. */ if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX)) { @@ -1544,7 +1544,7 @@ shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt; } else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP)) -@@ -636,7 +644,12 @@ handle_elf (int fd, Elf *elf, const char +@@ -637,7 +645,12 @@ handle_elf (int fd, Elf *elf, const char for (inner = 1; inner < shdr_info[cnt].data->d_size / sizeof (Elf32_Word); ++inner) @@ -1557,7 +1557,7 @@ if (inner == 1 || (inner == 2 && (grpref[0] & GRP_COMDAT) == 0)) /* If the section group contains only one element and this -@@ -647,7 +660,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -648,7 +661,7 @@ handle_elf (int fd, Elf *elf, const char } else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym)) { @@ -1566,7 +1566,7 @@ shdr_info[shdr_info[cnt].shdr.sh_link].version_idx = cnt; } -@@ -655,7 +668,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -656,7 +669,7 @@ handle_elf (int fd, Elf *elf, const char discarded right away. */ if ((shdr_info[cnt].shdr.sh_flags & SHF_GROUP) != 0) { @@ -1575,7 +1575,7 @@ if (shdr_info[shdr_info[cnt].group_idx].idx == 0) { -@@ -731,10 +744,14 @@ handle_elf (int fd, Elf *elf, const char +@@ -732,10 +745,14 @@ handle_elf (int fd, Elf *elf, const char { /* If a relocation section is marked as being removed make sure the section it is relocating is removed, too. */ @@ -1593,7 +1593,7 @@ /* If a group section is marked as being removed make sure all the sections it contains are being removed, too. */ -@@ -778,7 +795,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -779,7 +796,7 @@ handle_elf (int fd, Elf *elf, const char if (shdr_info[cnt].symtab_idx != 0 && shdr_info[shdr_info[cnt].symtab_idx].data == NULL) { @@ -1602,7 +1602,7 @@ shdr_info[shdr_info[cnt].symtab_idx].data = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn, -@@ -818,6 +835,9 @@ handle_elf (int fd, Elf *elf, const char +@@ -819,6 +836,9 @@ handle_elf (int fd, Elf *elf, const char else if (scnidx == SHN_XINDEX) scnidx = xndx; @@ -1612,7 +1612,7 @@ if (shdr_info[scnidx].idx == 0) /* This symbol table has a real symbol in a discarded section. So preserve the -@@ -848,12 +868,16 @@ handle_elf (int fd, Elf *elf, const char +@@ -849,12 +869,16 @@ handle_elf (int fd, Elf *elf, const char } /* Handle references through sh_info. */ @@ -1631,7 +1631,7 @@ /* Mark the section as investigated. */ shdr_info[cnt].idx = 2; -@@ -994,7 +1018,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -995,7 +1019,7 @@ handle_elf (int fd, Elf *elf, const char error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"), elf_errmsg (-1)); @@ -1640,7 +1640,7 @@ /* Add this name to the section header string table. */ shdr_info[cnt].se = ebl_strtabadd (shst, shdr_info[cnt].name, 0); -@@ -1031,7 +1055,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -1032,7 +1056,7 @@ handle_elf (int fd, Elf *elf, const char error (EXIT_FAILURE, 0, gettext ("while create section header section: %s"), elf_errmsg (-1)); @@ -1649,7 +1649,7 @@ shdr_info[cnt].data = elf_newdata (shdr_info[cnt].newscn); if (shdr_info[cnt].data == NULL) -@@ -1087,7 +1111,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -1089,7 +1113,7 @@ handle_elf (int fd, Elf *elf, const char error (EXIT_FAILURE, 0, gettext ("while create section header section: %s"), elf_errmsg (-1)); @@ -1658,7 +1658,7 @@ /* Finalize the string table and fill in the correct indices in the section headers. */ -@@ -1177,20 +1201,20 @@ handle_elf (int fd, Elf *elf, const char +@@ -1179,20 +1203,20 @@ handle_elf (int fd, Elf *elf, const char shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn, NULL); @@ -1682,7 +1682,7 @@ >= shdr_info[cnt].data->d_size / elsize); } -@@ -1245,7 +1269,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -1247,7 +1271,7 @@ handle_elf (int fd, Elf *elf, const char sec = shdr_info[sym->st_shndx].idx; else { @@ -1691,7 +1691,7 @@ sec = shdr_info[xshndx].idx; } -@@ -1266,7 +1290,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -1268,7 +1292,7 @@ handle_elf (int fd, Elf *elf, const char nxshndx = sec; } @@ -1700,7 +1700,7 @@ if ((inner != destidx || nshndx != sym->st_shndx || (shndxdata != NULL && nxshndx != xshndx)) -@@ -1293,9 +1317,11 @@ handle_elf (int fd, Elf *elf, const char +@@ -1295,9 +1319,11 @@ handle_elf (int fd, Elf *elf, const char { size_t sidx = (sym->st_shndx != SHN_XINDEX ? sym->st_shndx : xshndx); @@ -1715,7 +1715,7 @@ } } -@@ -1483,11 +1509,11 @@ handle_elf (int fd, Elf *elf, const char +@@ -1485,11 +1511,11 @@ handle_elf (int fd, Elf *elf, const char { GElf_Sym sym_mem; GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem); @@ -1729,7 +1729,7 @@ size_t hidx = elf_hash (name) % nbucket; if (bucket[hidx] == 0) -@@ -1506,8 +1532,8 @@ handle_elf (int fd, Elf *elf, const char +@@ -1508,8 +1534,8 @@ handle_elf (int fd, Elf *elf, const char else { /* Alpha and S390 64-bit use 64-bit SHT_HASH entries. */ @@ -1740,7 +1740,7 @@ Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf; -@@ -1537,11 +1563,11 @@ handle_elf (int fd, Elf *elf, const char +@@ -1539,11 +1565,11 @@ handle_elf (int fd, Elf *elf, const char { GElf_Sym sym_mem; GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem); diff --git a/elfutils.spec b/elfutils.spec index 6455bc0..084f96c 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,7 +1,7 @@ Name: elfutils Summary: A collection of utilities and DSOs to handle compiled objects -Version: 0.155 -%global baserelease 6 +Version: 0.156 +%global baserelease 1 URL: https://fedorahosted.org/elfutils/ %global source_url http://fedorahosted.org/releases/e/l/elfutils/%{version}/ License: GPLv3+ and (GPLv2+ or LGPLv3+) @@ -45,9 +45,6 @@ Group: Development/Tools Source: %{?source_url}%{name}-%{version}.tar.bz2 Patch1: %{?source_url}elfutils-robustify.patch Patch2: %{?source_url}elfutils-portability.patch -Patch3: elfutils-0.155-binutils-pr-ld-13621.patch -Patch4: elfutils-0.155-mem-align.patch -Patch5: elfutils-0.155-sizeof-pointer-memaccess.patch %if !%{compat} Release: %{baserelease}%{?dist} @@ -212,10 +209,6 @@ sed -i.scanf-m -e 's/%m/%a/g' src/addr2line.c tests/line2addr.c %endif %endif -%patch3 -p1 -b .binutils-pr-ld-13621 -%patch4 -p1 -b .mem-align -%patch5 -p1 -b .sizeof-pointer-memaccess - find . -name \*.sh ! -perm -0100 -print | xargs chmod +x %build @@ -331,6 +324,17 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/libelf.a %changelog +* Thu Jul 25 2013 Jan Kratochvil 0.156-1 +- Update to 0.156. + - #890447 - Add __bss_start and __TMC_END__ to elflint. + - #909481 - Only try opening files with installed compression libraries. + - #914908 - Add __bss_start__ to elflint. + - #853757 - Updated Polish translation. + - #985438 - Incorrect prototype of __libdwfl_find_elf_build_id. + - Drop upstreamed elfutils-0.155-binutils-pr-ld-13621.patch. + - Drop upstreamed elfutils-0.155-mem-align.patch. + - Drop upstreamed elfutils-0.155-sizeof-pointer-memaccess.patch. + * Tue Jul 02 2013 Karsten Hopp 0.155-6 - bump release and rebuild to fix dependencies on PPC @@ -359,7 +363,7 @@ rm -rf ${RPM_BUILD_ROOT} * Wed Aug 01 2012 Mark Wielaard 0.154-3 - Add dwz support -* Mon Jul 18 2012 Mark Wielaard 0.154-2 +* Wed Jul 18 2012 Mark Wielaard 0.154-2 - Add upstream xlatetom fix (#835877) * Mon Jul 02 2012 Karsten Hopp 0.154-1.1 diff --git a/sources b/sources index 3f7d6d6..5ffe5fe 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -163a5712b86f6bdfebdf233cc6e2192d elfutils-0.155.tar.bz2 +f3b5cbb63b0757f571c6cc109df4c55b elfutils-0.156.tar.bz2