diff --git a/elfutils-0.137-dwarf-header-check-fix.diff b/elfutils-0.137-dwarf-header-check-fix.diff index 3fa360c..a432845 100644 --- a/elfutils-0.137-dwarf-header-check-fix.diff +++ b/elfutils-0.137-dwarf-header-check-fix.diff @@ -14,11 +14,9 @@ semantic error: libdw failure (dwarf_getsrcfiles): invalid DWARF libdw/dwarf_getsrclines.c | 2 ++ 1 file changed, 2 insertions(+) -Index: elfutils-0.155/libdw/dwarf_getsrclines.c -=================================================================== ---- elfutils-0.155.orig/libdw/dwarf_getsrclines.c -+++ elfutils-0.155/libdw/dwarf_getsrclines.c -@@ -296,8 +296,10 @@ dwarf_getsrclines (Dwarf_Die *cudie, Dwa +--- a/libdw/dwarf_getsrclines.c ++++ b/libdw/dwarf_getsrclines.c +@@ -306,8 +306,10 @@ dwarf_getsrclines (Dwarf_Die *cudie, Dwa /* Consistency check. */ if (unlikely (linep != header_start + header_length)) { diff --git a/elfutils-0.148-dont-crash.diff b/elfutils-0.148-dont-crash.diff index 271facf..4408153 100644 --- a/elfutils-0.148-dont-crash.diff +++ b/elfutils-0.148-dont-crash.diff @@ -2,10 +2,12 @@ From: Stephan Kulow Avoid crash if the header is 0 -Index: elfutils-0.155/libdw/dwarf_getcfi_elf.c -=================================================================== ---- elfutils-0.155.orig/libdw/dwarf_getcfi_elf.c -+++ elfutils-0.155/libdw/dwarf_getcfi_elf.c +--- + libdw/dwarf_getcfi_elf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/libdw/dwarf_getcfi_elf.c ++++ b/libdw/dwarf_getcfi_elf.c @@ -76,7 +76,7 @@ parse_eh_frame_hdr (const uint8_t *hdr, { const uint8_t *h = hdr; diff --git a/elfutils-0.157.tar.bz2 b/elfutils-0.157.tar.bz2 deleted file mode 100644 index d438a38..0000000 --- a/elfutils-0.157.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4fadc9c0c19d02fb6d2bdfee65f20ddbecba398d3f714e2b6c42ffc4615cce85 -size 2624207 diff --git a/elfutils-0.158.tar.bz2 b/elfutils-0.158.tar.bz2 new file mode 100644 index 0000000..ff20f97 --- /dev/null +++ b/elfutils-0.158.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be27af5c21352f53e010342bf1c68e0b9e18232dbf3adec7e2f9b41f6bbe397d +size 4931570 diff --git a/elfutils-no-po-test-build.diff b/elfutils-no-po-test-build.diff index c364205..d670886 100644 --- a/elfutils-no-po-test-build.diff +++ b/elfutils-no-po-test-build.diff @@ -2,10 +2,13 @@ From: unknown Upstream: no Subject: do not build po and tests components -Index: elfutils-0.155/Makefile.am -=================================================================== ---- elfutils-0.155.orig/Makefile.am -+++ elfutils-0.155/Makefile.am +--- + Makefile.am | 2 +- + Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/Makefile.am ++++ b/Makefile.am @@ -24,7 +24,7 @@ pkginclude_HEADERS = version.h # Add doc back when we have some real content. @@ -15,11 +18,9 @@ Index: elfutils-0.155/Makefile.am EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ COPYING COPYING-GPLV2 COPYING-LGPLV3 -Index: elfutils-0.155/Makefile.in -=================================================================== ---- elfutils-0.155.orig/Makefile.in -+++ elfutils-0.155/Makefile.in -@@ -259,7 +259,7 @@ pkginclude_HEADERS = version.h +--- a/Makefile.in ++++ b/Makefile.in +@@ -360,7 +360,7 @@ pkginclude_HEADERS = version.h # Add doc back when we have some real content. SUBDIRS = config m4 lib libelf libebl libdwfl libdw libcpu libasm backends \ diff --git a/elfutils-portability.patch b/elfutils-portability.patch index 72eb9af..9fa95c8 100644 --- a/elfutils-portability.patch +++ b/elfutils-portability.patch @@ -1,6 +1,64 @@ ---- elfutils/backends/ChangeLog -+++ elfutils/backends/ChangeLog -@@ -188,6 +188,10 @@ +From: unknown +Subject: elfutils portability +Upstream: no +References: https://fedorahosted.org/releases/e/l/elfutils/0.158/elfutils-portability.patch +Signed-off-by: Tony Jones + +Various portability fixes not deemed acceptable for inclusion into git repo. + +--- + ChangeLog | 30 ++++++++ + Makefile.in | 2 + backends/ChangeLog | 12 +++ + backends/Makefile.am | 2 + backends/Makefile.in | 12 +-- + config.h.in | 6 + + config/ChangeLog | 4 + + config/Makefile.in | 2 + config/eu.am | 12 ++- + configure | 160 +++++++++++++++++++++++++++++++++++++++++++- + configure.ac | 60 +++++++++++++++- + lib/ChangeLog | 8 ++ + lib/Makefile.in | 10 +- + lib/eu-config.h | 11 +++ + libasm/ChangeLog | 5 + + libasm/Makefile.in | 14 ++- + libcpu/ChangeLog | 8 ++ + libcpu/Makefile.in | 10 +- + libcpu/i386_disasm.c | 1 + libdw/ChangeLog | 13 +++ + libdw/Makefile.in | 12 +-- + libdw/dwarf_begin_elf.c | 8 ++ + libdw/libdw.h | 2 + libdwfl/ChangeLog | 20 +++++ + libdwfl/Makefile.in | 24 +++--- + libdwfl/linux-core-attach.c | 29 +++++++ + libdwfl/linux-pid-attach.c | 19 ++++- + libebl/ChangeLog | 5 + + libebl/Makefile.in | 10 +- + libelf/ChangeLog | 10 ++ + libelf/Makefile.in | 16 ++-- + libelf/common.h | 4 - + libelf/gnuhash_xlate.h | 6 + + m4/Makefile.in | 2 + src/ChangeLog | 30 ++++++++ + src/Makefile.am | 3 + src/Makefile.in | 25 ++++-- + src/addr2line.c | 4 - + src/findtextrel.c | 6 + + src/ld.h | 2 + src/readelf.c | 15 ++-- + src/strings.c | 11 +++ + src/strip.c | 20 ++++- + tests/ChangeLog | 14 +++ + tests/Makefile.in | 34 ++++----- + tests/backtrace.c | 1 + tests/line2addr.c | 2 + 47 files changed, 616 insertions(+), 100 deletions(-) + +--- a/backends/ChangeLog ++++ b/backends/ChangeLog +@@ -292,6 +292,10 @@ * ppc_attrs.c (ppc_check_object_attribute): Handle tag GNU_Power_ABI_Struct_Return. @@ -11,7 +69,7 @@ 2008-10-04 Ulrich Drepper * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and -@@ -515,6 +519,11 @@ +@@ -619,6 +623,11 @@ * sparc_init.c: Likewise. * x86_64_init.c: Likewise. @@ -23,7 +81,7 @@ 2005-11-19 Roland McGrath * ppc64_reloc.def: REL30 -> ADDR30. -@@ -537,6 +546,9 @@ +@@ -641,6 +650,9 @@ * Makefile.am (uninstall): Don't try to remove $(pkgincludedir). (CLEANFILES): Add libebl_$(m).so. @@ -33,9 +91,9 @@ * 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 +--- a/backends/Makefile.am ++++ b/backends/Makefile.am +@@ -124,7 +124,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) \ @@ -44,8 +102,8 @@ $(textrel_check) libebl_i386.so: $(cpu_i386) ---- elfutils/backends/Makefile.in -+++ elfutils/backends/Makefile.in +--- a/backends/Makefile.in ++++ b/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 \ @@ -55,8 +113,8 @@ +@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@ + am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ +@@ -284,6 +285,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -64,7 +122,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -295,6 +297,7 @@ SHELL = @SHELL@ +@@ -315,6 +317,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -72,7 +130,7 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -357,10 +360,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr +@@ -378,10 +381,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 \ @@ -85,7 +143,7 @@ @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 +@@ -888,7 +890,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) \ @@ -94,9 +152,9 @@ $(textrel_check) libebl_i386.so: $(cpu_i386) ---- elfutils/ChangeLog -+++ elfutils/ChangeLog -@@ -38,6 +38,8 @@ +--- a/ChangeLog ++++ b/ChangeLog +@@ -118,6 +118,8 @@ 2012-01-24 Mark Wielaard @@ -105,7 +163,7 @@ * COPYING: Fix address. Updated version from gnulib. 2012-01-23 Mark Wielaard -@@ -56,6 +58,9 @@ +@@ -136,6 +138,9 @@ 2011-10-08 Mike Frysinger @@ -115,7 +173,7 @@ * configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly. 2011-10-02 Ulrich Drepper -@@ -77,6 +82,10 @@ +@@ -157,6 +162,10 @@ * configure.ac (LOCALEDIR, DATADIRNAME): Removed. @@ -126,7 +184,7 @@ 2009-09-21 Ulrich Drepper * configure.ac: Update for more modern autoconf. -@@ -85,6 +94,10 @@ +@@ -165,6 +174,10 @@ * configure.ac (zip_LIBS): Check for liblzma too. @@ -137,7 +195,7 @@ 2009-04-19 Roland McGrath * configure.ac (eu_version): Round down here, not in version.h macros. -@@ -96,6 +109,8 @@ +@@ -176,6 +189,8 @@ 2009-01-23 Roland McGrath @@ -146,7 +204,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 -@@ -176,6 +191,10 @@ +@@ -256,6 +271,10 @@ * configure.ac: Add dummy automake conditional to get dependencies for non-generic linker right. See src/Makefile.am. @@ -157,7 +215,7 @@ 2005-11-18 Roland McGrath * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable. -@@ -223,6 +242,17 @@ +@@ -303,6 +322,17 @@ * Makefile.am (all_SUBDIRS): Add libdwfl. * configure.ac: Write libdwfl/Makefile. @@ -175,9 +233,9 @@ 2005-05-19 Roland McGrath * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros. ---- elfutils/config/ChangeLog -+++ elfutils/config/ChangeLog -@@ -23,6 +23,10 @@ +--- a/config/ChangeLog ++++ b/config/ChangeLog +@@ -44,6 +44,10 @@ * known-dwarf.awk: Use gawk. @@ -188,8 +246,8 @@ 2010-07-02 Ulrich Drepper * elfutils.spec.in: Add more BuildRequires. ---- elfutils/config/eu.am -+++ elfutils/config/eu.am +--- a/config/eu.am ++++ b/config/eu.am @@ -1,6 +1,6 @@ ## Common automake fragments for elfutils subdirectory makefiles. ## @@ -221,9 +279,9 @@ if MUDFLAP AM_CFLAGS += -fmudflap libmudflap = -lmudflap ---- elfutils/config/Makefile.in -+++ elfutils/config/Makefile.in -@@ -140,6 +140,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +--- a/config/Makefile.in ++++ b/config/Makefile.in +@@ -147,6 +147,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -231,7 +289,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -169,6 +170,7 @@ SHELL = @SHELL@ +@@ -178,6 +179,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -239,8 +297,8 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ ---- elfutils/config.h.in -+++ elfutils/config.h.in +--- a/config.h.in ++++ b/config.h.in @@ -6,6 +6,9 @@ /* Defined if libdw should support GNU ref_alt FORM, dwz multi files. */ #undef ENABLE_DWZ @@ -248,10 +306,10 @@ +/* Have __builtin_popcount. */ +#undef HAVE_BUILTIN_POPCOUNT + - /* $libdir subdirectory containing libebl modules. */ - #undef LIBEBL_SUBDIR + /* Define to 1 if you have the header file. */ + #undef HAVE_INTTYPES_H -@@ -69,4 +72,7 @@ +@@ -102,4 +105,7 @@ /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES @@ -259,9 +317,9 @@ +#undef __thread + #include ---- elfutils/configure -+++ elfutils/configure -@@ -618,6 +618,8 @@ ZLIB_TRUE +--- a/configure ++++ b/configure +@@ -661,6 +661,8 @@ ZLIB_TRUE LIBEBL_SUBDIR TESTS_RPATH_FALSE TESTS_RPATH_TRUE @@ -270,16 +328,16 @@ BUILD_STATIC_FALSE BUILD_STATIC_TRUE USE_VALGRIND_FALSE -@@ -635,6 +637,8 @@ NEVER_TRUE +@@ -678,6 +680,8 @@ NEVER_TRUE base_cpu NATIVE_LD_FALSE NATIVE_LD_TRUE +LD_AS_NEEDED +WEXTRA - LEXLIB - LEX_OUTPUT_ROOT - LEX -@@ -755,6 +759,7 @@ enable_debugpred + NM + READELF + ac_ct_AR +@@ -802,6 +806,7 @@ enable_debugpred enable_gprof enable_gcov enable_valgrind @@ -287,7 +345,7 @@ enable_tests_rpath enable_libebl_subdir with_zlib -@@ -1412,6 +1417,7 @@ Optional Features: +@@ -1461,6 +1466,7 @@ Optional Features: --enable-gprof build binaries with gprof support --enable-gcov build binaries with gcov support --enable-valgrind run all tests under valgrind @@ -295,7 +353,7 @@ --enable-tests-rpath build $ORIGIN-using rpath into tests --enable-libebl-subdir=DIR install libebl_CPU modules in $(libdir)/DIR -@@ -4012,6 +4018,130 @@ if test "x$ac_cv_c99" != xyes; then : +@@ -4709,6 +4715,130 @@ if test "x$ac_cv_c99" != xyes; then : as_fn_error $? "gcc with C99 support required" "$LINENO" 5 fi @@ -426,7 +484,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 : -@@ -4048,7 +4178,13 @@ fi +@@ -4745,7 +4875,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 +499,7 @@ fi # Check whether --enable-largefile was given. -@@ -4458,6 +4594,22 @@ else +@@ -5155,6 +5291,22 @@ else fi @@ -464,16 +522,16 @@ # Check whether --enable-tests-rpath was given. if test "${enable_tests_rpath+set}" = set; then : enableval=$enable_tests_rpath; tests_use_rpath=$enableval -@@ -5178,7 +5330,7 @@ case "$eu_version" in +@@ -5875,7 +6027,7 @@ case "$eu_version" in esac # Round up to the next release API (x.y) version. -eu_version=$(( (eu_version + 999) / 1000 )) +eu_version=`expr \( $eu_version + 999 \) / 1000` - cat >confcache <<\_ACEOF - # This file is a shell script that caches the results of configure -@@ -5353,6 +5505,10 @@ if test -z "${BUILD_STATIC_TRUE}" && tes + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -6613,6 +6765,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 @@ -484,9 +542,9 @@ if test -z "${TESTS_RPATH_TRUE}" && test -z "${TESTS_RPATH_FALSE}"; then as_fn_error $? "conditional \"TESTS_RPATH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 ---- elfutils/configure.ac -+++ elfutils/configure.ac -@@ -90,6 +90,54 @@ CFLAGS="$old_CFLAGS"]) +--- a/configure.ac ++++ b/configure.ac +@@ -99,6 +99,54 @@ CFLAGS="$old_CFLAGS"]) AS_IF([test "x$ac_cv_c99" != xyes], AC_MSG_ERROR([gcc with C99 support required])) @@ -541,7 +599,7 @@ AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl # Use the same flags that we use for our DSOs, so the test is representative. # Some old compiler/linker/libc combinations fail some ways and not others. -@@ -105,7 +153,10 @@ static __thread int a; int foo (int b) { +@@ -114,7 +162,10 @@ static __thread int a; int foo (int b) { CFLAGS="$save_CFLAGS" LDFLAGS="$save_LDFLAGS"]) AS_IF([test "x$ac_cv_tls" != xyes], @@ -553,7 +611,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 -@@ -204,6 +255,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_ +@@ -213,6 +264,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,17 +623,18 @@ 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]) -@@ -315,6 +371,6 @@ case "$eu_version" in +@@ -324,7 +380,7 @@ case "$eu_version" in esac # Round up to the next release API (x.y) version. -eu_version=$(( (eu_version + 999) / 1000 )) +eu_version=`expr \( $eu_version + 999 \) / 1000` - AC_OUTPUT ---- elfutils/lib/ChangeLog -+++ elfutils/lib/ChangeLog -@@ -57,6 +57,9 @@ + AC_CHECK_SIZEOF(long) + +--- a/lib/ChangeLog ++++ b/lib/ChangeLog +@@ -61,6 +61,9 @@ 2009-01-23 Roland McGrath @@ -585,7 +644,7 @@ * eu-config.h: Add multiple inclusion protection. 2009-01-17 Ulrich Drepper -@@ -113,6 +116,11 @@ +@@ -117,6 +120,11 @@ * Makefile.am (libeu_a_SOURCES): Add it. * system.h: Declare crc32_file. @@ -597,8 +656,8 @@ 2005-04-30 Ulrich Drepper * Makefile.am: Use -ffunction-sections for xmalloc.c. ---- elfutils/lib/eu-config.h -+++ elfutils/lib/eu-config.h +--- a/lib/eu-config.h ++++ b/lib/eu-config.h @@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .pr /* This macro is used by the tests conditionalize for standalone building. */ #define ELFUTILS_HEADER(name) @@ -617,8 +676,8 @@ #ifdef SHARED # define OLD_VERSION(name, version) \ ---- elfutils/lib/Makefile.in -+++ elfutils/lib/Makefile.in +--- a/lib/Makefile.in ++++ b/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 \ @@ -628,8 +687,8 @@ +@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@ + am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ +@@ -198,6 +199,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -637,7 +696,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -222,6 +224,7 @@ SHELL = @SHELL@ +@@ -229,6 +231,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -645,7 +704,7 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -283,10 +286,9 @@ zip_LIBS = @zip_LIBS@ +@@ -291,10 +294,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 \ @@ -658,8 +717,8 @@ @MUDFLAP_FALSE@libmudflap = @MUDFLAP_TRUE@libmudflap = -lmudflap COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ ---- elfutils/libasm/ChangeLog -+++ elfutils/libasm/ChangeLog +--- a/libasm/ChangeLog ++++ b/libasm/ChangeLog @@ -75,6 +75,11 @@ * asm_error.c: Add new error ASM_E_IOERROR. * libasmP.h: Add ASM_E_IOERROR definition. @@ -672,8 +731,8 @@ 2005-02-15 Ulrich Drepper * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. ---- elfutils/libasm/Makefile.in -+++ elfutils/libasm/Makefile.in +--- a/libasm/Makefile.in ++++ b/libasm/Makefile.in @@ -83,10 +83,11 @@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ @@ -687,8 +746,8 @@ +@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_3 = -lpthread subdir = libasm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ -@@ -245,6 +246,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ +@@ -250,6 +251,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -696,7 +755,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -274,6 +276,7 @@ SHELL = @SHELL@ +@@ -281,6 +283,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = 1 @@ -704,7 +763,7 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -336,10 +339,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr +@@ -344,10 +347,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 +776,7 @@ @MUDFLAP_FALSE@libmudflap = @MUDFLAP_TRUE@libmudflap = -lmudflap COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ -@@ -368,7 +370,7 @@ libasm_a_SOURCES = asm_begin.c asm_abort +@@ -376,7 +378,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) @@ -726,8 +785,8 @@ @MUDFLAP_FALSE@libasm_so_SOURCES = noinst_HEADERS = libasmP.h symbolhash.h EXTRA_DIST = libasm.map ---- elfutils/libcpu/ChangeLog -+++ elfutils/libcpu/ChangeLog +--- a/libcpu/ChangeLog ++++ b/libcpu/ChangeLog @@ -47,6 +47,9 @@ 2009-01-23 Roland McGrath @@ -750,8 +809,8 @@ 2005-02-15 Ulrich Drepper * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. ---- elfutils/libcpu/i386_disasm.c -+++ elfutils/libcpu/i386_disasm.c +--- a/libcpu/i386_disasm.c ++++ b/libcpu/i386_disasm.c @@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, con default: @@ -760,8 +819,8 @@ } } else ---- elfutils/libcpu/Makefile.in -+++ elfutils/libcpu/Makefile.in +--- a/libcpu/Makefile.in ++++ b/libcpu/Makefile.in @@ -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 \ @@ -772,7 +831,7 @@ @MAINTAINER_MODE_TRUE@noinst_PROGRAMS = i386_gendis$(EXEEXT) subdir = libcpu ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -@@ -220,6 +221,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -225,6 +226,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -780,7 +839,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = lex.$( * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info. -@@ -536,6 +540,10 @@ +@@ -705,6 +709,10 @@ * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too. @@ -825,7 +884,7 @@ 2009-08-10 Roland McGrath * dwarf_getscopevar.c: Use dwarf_diename. -@@ -1304,6 +1312,11 @@ +@@ -1473,6 +1481,11 @@ 2005-05-31 Roland McGrath @@ -837,8 +896,8 @@ * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to formref offset. ---- elfutils/libdw/dwarf_begin_elf.c -+++ elfutils/libdw/dwarf_begin_elf.c +--- a/libdw/dwarf_begin_elf.c ++++ b/libdw/dwarf_begin_elf.c @@ -48,6 +48,14 @@ #if USE_ZLIB # include @@ -854,9 +913,9 @@ # include # undef crc32 #endif ---- elfutils/libdw/libdw.h -+++ elfutils/libdw/libdw.h -@@ -831,7 +831,7 @@ extern Dwarf_OOM dwarf_new_oom_handler ( +--- a/libdw/libdw.h ++++ b/libdw/libdw.h +@@ -879,7 +879,7 @@ extern Dwarf_OOM dwarf_new_oom_handler ( /* Inline optimizations. */ @@ -865,8 +924,8 @@ /* Return attribute code of given attribute. */ __libdw_extern_inline unsigned int dwarf_whatattr (Dwarf_Attribute *attr) ---- elfutils/libdw/Makefile.in -+++ elfutils/libdw/Makefile.in +--- a/libdw/Makefile.in ++++ b/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) \ @@ -879,7 +938,7 @@ @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) @MUDFLAP_TRUE@am_libdw_pic_a_OBJECTS = subdir = libdw -@@ -291,6 +292,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -295,6 +296,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -887,7 +946,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -320,6 +322,7 @@ SHELL = @SHELL@ +@@ -326,6 +328,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = 1 @@ -895,7 +954,7 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -381,10 +384,9 @@ zip_LIBS = @zip_LIBS@ +@@ -388,10 +391,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 \ @@ -908,9 +967,31 @@ @MUDFLAP_FALSE@libmudflap = @MUDFLAP_TRUE@libmudflap = -lmudflap COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ ---- elfutils/libdwfl/ChangeLog -+++ elfutils/libdwfl/ChangeLog -@@ -1624,6 +1624,11 @@ +--- a/libdwfl/ChangeLog ++++ b/libdwfl/ChangeLog +@@ -283,6 +283,21 @@ + (dwfl_module_addrsym) (i_to_symfile): New function. + (dwfl_module_addrsym) (search_table): Use it. + ++2013-11-09 Jan Kratochvil ++ ++ Older OS compatibility bits. ++ * linux-core-attach.c (be64toh, le64toh, be32toh, le32toh): Provide ++ fallbacks if not defined by system. ++ ++2013-11-09 Jan Kratochvil ++ ++ Handle T-stopped detach for old kernels. ++ * linux-pid-attach.c (struct pid_arg): New field stopped. ++ (ptrace_attach): New parameter stoppedp. Set it appropriately. ++ (pid_set_initial_registers): Pass the new field. ++ (pid_thread_detach): Handle the case of STOPPED for old kernels. ++ (__libdwfl_attach_state_for_pid): Initialize STOPPED. ++ + 2013-11-07 Jan Kratochvil + Mark Wielaard + +@@ -2048,6 +2063,11 @@ 2005-07-21 Roland McGrath @@ -922,8 +1003,77 @@ * Makefile.am (noinst_HEADERS): Add loc2c.c. * test2.c (main): Check sscanf result to quiet warning. ---- elfutils/libdwfl/Makefile.in -+++ elfutils/libdwfl/Makefile.in +--- a/libdwfl/linux-core-attach.c ++++ b/libdwfl/linux-core-attach.c +@@ -29,6 +29,35 @@ + #include "libdwflP.h" + #include + #include "system.h" ++#include ++#include ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++# ifndef be64toh ++# define be64toh(x) bswap_64 (x) ++# endif ++# ifndef le64toh ++# define le64toh(x) (x) ++# endif ++# ifndef be32toh ++# define be32toh(x) bswap_32 (x) ++# endif ++# ifndef le32toh ++# define le32toh(x) (x) ++# endif ++#else ++# ifndef be64toh ++# define be64toh(x) (x) ++# endif ++# ifndef le64toh ++# define le64toh(x) bswap_64 (x) ++# endif ++# ifndef be32toh ++# define be32toh(x) (x) ++# endif ++# ifndef le32toh ++# define le32toh(x) bswap_32 (x) ++# endif ++#endif + + #ifndef MIN + # define MIN(a, b) ((a) < (b) ? (a) : (b)) +--- a/libdwfl/linux-pid-attach.c ++++ b/libdwfl/linux-pid-attach.c +@@ -268,13 +268,24 @@ pid_thread_detach (Dwfl_Thread *thread, + pid_arg->tid_attached = 0; + if (! pid_arg->assume_ptrace_stopped) + { ++ // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special ++ // handling of the detachment to keep the process State: T (stopped). ++ if (pid_arg->tid_was_stopped) ++ syscall (__NR_tkill, tid, SIGSTOP); + /* This handling is needed only on older Linux kernels such as +- 2.6.32-358.23.2.el6.ppc64. Later kernels such as +- 3.11.7-200.fc19.x86_64 remember the T (stopped) state +- themselves and no longer need to pass SIGSTOP during +- PTRACE_DETACH. */ ++ 2.6.32-358.23.2.el6.ppc64. Later kernels such as 3.11.7-200.fc19.x86_64 ++ remember the T (stopped) state themselves and no longer need to pass ++ SIGSTOP during PTRACE_DETACH. */ + ptrace (PTRACE_DETACH, tid, NULL, + (void *) (intptr_t) (pid_arg->tid_was_stopped ? SIGSTOP : 0)); ++ if (pid_arg->tid_was_stopped) ++ { ++ // Wait till the SIGSTOP settles down. ++ int i; ++ for (i = 0; i < 100000; i++) ++ if (linux_proc_pid_is_stopped (tid)) ++ break; ++ } + } + } + +--- a/libdwfl/Makefile.in ++++ b/libdwfl/Makefile.in @@ -82,11 +82,12 @@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ @@ -942,7 +1092,7 @@ @MUDFLAP_TRUE@am_libdwfl_pic_a_OBJECTS = subdir = libdwfl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -@@ -280,6 +281,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -289,6 +290,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -950,7 +1100,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -309,6 +311,7 @@ SHELL = @SHELL@ +@@ -320,6 +322,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = 1 @@ -958,7 +1108,7 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -371,10 +374,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr +@@ -383,10 +386,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,29 +1121,29 @@ @MUDFLAP_FALSE@libmudflap = @MUDFLAP_TRUE@libmudflap = -lmudflap COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ -@@ -382,7 +384,7 @@ COMPILE.os = $(filter-out -fprofile-arcs +@@ -394,7 +396,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 + textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi -noinst_LIBRARIES = libdwfl.a $(am__append_2) +noinst_LIBRARIES = libdwfl.a $(am__append_3) 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 \ -@@ -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 \ +@@ -417,8 +419,8 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en dwfl_module_register_names.c dwfl_segment_report_module.c \ -- link_map.c core-file.c open.c image-header.c $(am__append_3) \ + link_map.c core-file.c open.c image-header.c dwfl_frame.c \ + frame_unwind.c dwfl_frame_pc.c linux-pid-attach.c \ +- linux-core-attach.c dwfl_frame_regs.c $(am__append_3) \ - $(am__append_4) $(am__append_5) -+ link_map.c core-file.c open.c image-header.c $(am__append_4) \ ++ linux-core-attach.c dwfl_frame_regs.c $(am__append_4) \ + $(am__append_5) $(am__append_6) @MUDFLAP_FALSE@libdwfl = $(libdw) @MUDFLAP_TRUE@libdwfl = libdwfl.a $(libdw) $(libebl) $(libelf) $(libeu) @MUDFLAP_FALSE@libdw = ../libdw/libdw.so ---- elfutils/libebl/ChangeLog -+++ elfutils/libebl/ChangeLog -@@ -674,6 +674,11 @@ +--- a/libebl/ChangeLog ++++ b/libebl/ChangeLog +@@ -738,6 +738,11 @@ * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency tracking works right. @@ -1005,8 +1155,8 @@ 2005-05-21 Ulrich Drepper * libebl_x86_64.map: Add x86_64_core_note. ---- elfutils/libebl/Makefile.in -+++ elfutils/libebl/Makefile.in +--- a/libebl/Makefile.in ++++ b/libebl/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 \ @@ -1016,8 +1166,8 @@ +@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 \ -@@ -242,6 +243,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ +@@ -249,6 +250,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -1025,7 +1175,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -271,6 +273,7 @@ SHELL = @SHELL@ +@@ -280,6 +282,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = 1 @@ -1033,7 +1183,7 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -333,10 +336,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr +@@ -343,10 +346,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 \ @@ -1046,9 +1196,9 @@ @MUDFLAP_FALSE@libmudflap = @MUDFLAP_TRUE@libmudflap = -lmudflap COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ ---- elfutils/libelf/ChangeLog -+++ elfutils/libelf/ChangeLog -@@ -46,6 +46,11 @@ +--- a/libelf/ChangeLog ++++ b/libelf/ChangeLog +@@ -85,6 +85,11 @@ * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check. @@ -1060,7 +1210,7 @@ 2011-02-26 Mark Wielaard * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini. -@@ -723,6 +728,11 @@ +@@ -762,6 +767,11 @@ * elf.h: Update from glibc. @@ -1072,8 +1222,8 @@ 2005-05-08 Roland McGrath * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now. ---- elfutils/libelf/common.h -+++ elfutils/libelf/common.h +--- a/libelf/common.h ++++ b/libelf/common.h @@ -139,7 +139,7 @@ libelf_release_all (Elf *elf) (Var) = (sizeof (Var) == 1 \ ? (unsigned char) (Var) \ @@ -1092,8 +1242,8 @@ : (sizeof (Var) == 4 \ ? bswap_32 (Var) \ : bswap_64 (Var)))) ---- elfutils/libelf/gnuhash_xlate.h -+++ elfutils/libelf/gnuhash_xlate.h +--- a/libelf/gnuhash_xlate.h ++++ b/libelf/gnuhash_xlate.h @@ -1,5 +1,5 @@ /* Conversion functions for versioning information. - Copyright (C) 2006, 2007 Red Hat, Inc. @@ -1112,8 +1262,8 @@ len -= 4; } } ---- elfutils/libelf/Makefile.in -+++ elfutils/libelf/Makefile.in +--- a/libelf/Makefile.in ++++ b/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) \ @@ -1129,8 +1279,8 @@ +@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@ + am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ +@@ -293,6 +294,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -1138,7 +1288,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -317,6 +319,7 @@ SHELL = @SHELL@ +@@ -324,6 +326,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = 1 @@ -1146,7 +1296,7 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -377,10 +380,9 @@ top_srcdir = @top_srcdir@ +@@ -385,10 +388,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 \ @@ -1159,7 +1309,7 @@ @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 +@@ -453,7 +455,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) @@ -1168,9 +1318,9 @@ @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 -@@ -139,6 +139,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +--- a/m4/Makefile.in ++++ b/m4/Makefile.in +@@ -145,6 +145,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -1178,7 +1328,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -168,6 +169,7 @@ SHELL = @SHELL@ +@@ -176,6 +177,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -1186,9 +1336,9 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ ---- elfutils/Makefile.in -+++ elfutils/Makefile.in -@@ -256,6 +256,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -263,6 +263,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -1196,7 +1346,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -285,6 +286,7 @@ SHELL = @SHELL@ +@@ -294,6 +295,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -1204,9 +1354,9 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ ---- elfutils/src/addr2line.c -+++ elfutils/src/addr2line.c -@@ -448,10 +448,10 @@ handle_address (const char *string, Dwfl +--- a/src/addr2line.c ++++ b/src/addr2line.c +@@ -540,10 +540,10 @@ handle_address (const char *string, Dwfl bool parsed = false; int i, j; char *name = NULL; @@ -1219,9 +1369,9 @@ { default: break; ---- elfutils/src/ChangeLog -+++ elfutils/src/ChangeLog -@@ -766,8 +766,16 @@ +--- a/src/ChangeLog ++++ b/src/ChangeLog +@@ -964,8 +964,16 @@ * readelf.c (attr_callback): Use print_block only when we don't use print_ops. @@ -1238,7 +1388,7 @@ * ar.c (do_oper_extract): Use pathconf instead of statfs. 2009-08-01 Ulrich Drepper -@@ -931,6 +939,8 @@ +@@ -1129,6 +1137,8 @@ * readelf.c (print_debug_frame_section): Use t instead of j formats for ptrdiff_t OFFSET. @@ -1247,7 +1397,7 @@ 2009-01-21 Ulrich Drepper * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section -@@ -1114,6 +1124,11 @@ +@@ -1312,6 +1322,11 @@ that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really is valid in RELRO. @@ -1259,7 +1409,7 @@ 2008-02-29 Roland McGrath * readelf.c (print_attributes): Add a cast. -@@ -1365,6 +1380,8 @@ +@@ -1563,6 +1578,8 @@ * readelf.c (hex_dump): Fix rounding error in whitespace calculation. @@ -1268,7 +1418,7 @@ 2007-10-15 Roland McGrath * make-debug-archive.in: New file. -@@ -1804,6 +1821,10 @@ +@@ -2002,6 +2019,10 @@ * elflint.c (valid_e_machine): Add EM_ALPHA. Reported by Christian Aichinger . @@ -1279,7 +1429,7 @@ 2006-08-08 Ulrich Drepper * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB. -@@ -1880,6 +1901,10 @@ +@@ -2078,6 +2099,10 @@ * Makefile.am: Add hacks to create dependency files for non-generic linker. @@ -1290,7 +1440,7 @@ 2006-06-12 Ulrich Drepper * ldgeneric.c (ld_generic_generate_sections): Don't create .interp -@@ -2228,6 +2253,11 @@ +@@ -2426,6 +2451,11 @@ * readelf.c (print_debug_loc_section): Fix indentation for larger address size. @@ -1302,8 +1452,8 @@ 2005-05-30 Roland McGrath * readelf.c (print_debug_line_section): Print section offset of each ---- elfutils/src/findtextrel.c -+++ elfutils/src/findtextrel.c +--- a/src/findtextrel.c ++++ b/src/findtextrel.c @@ -496,7 +496,11 @@ ptrcompare (const void *p1, const void * @@ -1317,8 +1467,8 @@ GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw, const char *fname, bool more_than_one, void **knownsrcs) { ---- elfutils/src/ld.h -+++ elfutils/src/ld.h +--- a/src/ld.h ++++ b/src/ld.h @@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void); /* Checked whether the symbol is undefined and referenced from a DSO. */ @@ -1334,8 +1484,8 @@ +#endif /* Optimizing and not GCC 4.2. */ #endif /* ld.h */ ---- elfutils/src/Makefile.am -+++ elfutils/src/Makefile.am +--- a/src/Makefile.am ++++ b/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 @@ -1346,8 +1496,8 @@ 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 +--- a/src/Makefile.in ++++ b/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 \ @@ -1379,7 +1529,7 @@ ld_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ld_LDFLAGS) $(LDFLAGS) -o \ $@ am_libld_elf_i386_so_OBJECTS = -@@ -338,6 +339,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -347,6 +348,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -1387,7 +1537,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -367,6 +369,7 @@ SHELL = @SHELL@ +@@ -378,6 +380,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -1395,7 +1545,7 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -430,10 +433,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr +@@ -442,10 +445,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 \ @@ -1408,7 +1558,7 @@ @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 +@@ -461,8 +463,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) \ @@ -1419,7 +1569,7 @@ @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 +@@ -491,6 +493,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 @@ -1429,7 +1579,7 @@ 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) +@@ -498,7 +503,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 \ @@ -1438,20 +1588,14 @@ ld_LDFLAGS = -rdynamic elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap) ---- elfutils/src/readelf.c -+++ elfutils/src/readelf.c -@@ -4150,6 +4150,8 @@ struct listptr - #define listptr_offset_size(p) ((p)->dwarf64 ? 8 : 4) - #define listptr_address_size(p) ((p)->addr64 ? 8 : 4) +--- a/src/readelf.c ++++ b/src/readelf.c +@@ -4171,10 +4171,12 @@ listptr_base (struct listptr *p) + return base; + } +static const char *listptr_name; + - static Dwarf_Addr - listptr_base (struct listptr *p) - { -@@ -4171,9 +4173,9 @@ listptr_base (struct listptr *p) - } - static int -compare_listptr (const void *a, const void *b, void *arg) +compare_listptr (const void *a, const void *b) @@ -1461,7 +1605,7 @@ struct listptr *p1 = (void *) a; struct listptr *p2 = (void *) b; -@@ -4262,8 +4264,11 @@ static void +@@ -4263,8 +4265,11 @@ static void sort_listptr (struct listptr_table *table, const char *name) { if (table->n > 0) @@ -1475,7 +1619,7 @@ } static bool -@@ -8986,7 +8991,7 @@ dump_archive_index (Elf *elf, const char +@@ -9151,7 +9156,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)) @@ -1484,8 +1628,8 @@ while (1) #endif error (EXIT_FAILURE, 0, ---- elfutils/src/strings.c -+++ elfutils/src/strings.c +--- a/src/strings.c ++++ b/src/strings.c @@ -43,6 +43,10 @@ #include @@ -1523,8 +1667,8 @@ } if (unlikely (elfmap == MAP_FAILED)) ---- elfutils/src/strip.c -+++ elfutils/src/strip.c +--- a/src/strip.c ++++ b/src/strip.c @@ -45,6 +45,12 @@ #include #include @@ -1575,9 +1719,33 @@ { error (0, errno, gettext ("\ cannot set access and modification date of '%s'"), fname); ---- elfutils/tests/ChangeLog -+++ elfutils/tests/ChangeLog -@@ -647,6 +647,8 @@ +--- a/tests/backtrace.c ++++ b/tests/backtrace.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + #include ELFUTILS_HEADER(dwfl) + + static int +--- a/tests/ChangeLog ++++ b/tests/ChangeLog +@@ -123,6 +123,13 @@ + + 2013-12-02 Jan Kratochvil + ++ Handle T-stopped detach for old kernels. ++ * backtrace.c: Include sys/syscall.h. ++ (linux_proc_pid_is_stopped): New function. ++ (ptrace_detach_stopped): Handle old kernels. ++ ++2013-12-02 Jan Kratochvil ++ + * Makefile.am (check_PROGRAMS): Add backtrace, backtrace-child, + backtrace-data and backtrace-dwarf. + (BUILT_SOURCES, clean-local, backtrace-child-biarch): New. +@@ -987,6 +994,8 @@ 2008-01-21 Roland McGrath @@ -1586,7 +1754,7 @@ * testfile45.S.bz2: Add tests for cltq, cqto. * testfile45.expect.bz2: Adjust. -@@ -1355,6 +1357,11 @@ +@@ -1695,6 +1704,11 @@ * Makefile.am (TESTS): Add run-elflint-test.sh. (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2. @@ -1598,8 +1766,8 @@ 2005-05-24 Ulrich Drepper * get-files.c (main): Use correct format specifier. ---- elfutils/tests/line2addr.c -+++ elfutils/tests/line2addr.c +--- a/tests/line2addr.c ++++ b/tests/line2addr.c @@ -124,7 +124,7 @@ main (int argc, char *argv[]) { struct args a = { .arg = argv[cnt] }; @@ -1609,8 +1777,8 @@ { default: case 0: ---- elfutils/tests/Makefile.in -+++ elfutils/tests/Makefile.in +--- a/tests/Makefile.in ++++ b/tests/Makefile.in @@ -80,14 +80,15 @@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ @@ -1631,26 +1799,37 @@ check_PROGRAMS = arextract$(EXEEXT) arsymtest$(EXEEXT) \ newfile$(EXEEXT) saridx$(EXEEXT) scnnames$(EXEEXT) \ sectiondump$(EXEEXT) showptable$(EXEEXT) update1$(EXEEXT) \ -@@ -142,13 +143,13 @@ - run-readelf-mixed-corenote.sh run-dwfllines.sh \ - run-dwfl-report-elf-align.sh run-addr2line-test.sh \ - run-addr2line-i-test.sh run-varlocs.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_8) $(am__EXEEXT_3) $(am__append_11) - @STANDALONE_FALSE@am__append_6 = msg_tst md5-sha1-test --@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 -+@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 +@@ -111,7 +112,7 @@ check_PROGRAMS = arextract$(EXEEXT) arsy + varlocs$(EXEEXT) backtrace$(EXEEXT) backtrace-child$(EXEEXT) \ + backtrace-data$(EXEEXT) backtrace-dwarf$(EXEEXT) \ + $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_4) +-@BIARCH_TRUE@am__append_5 = backtrace-child-biarch ++@BIARCH_TRUE@am__append_6 = backtrace-child-biarch + TESTS = run-arextract.sh run-arsymtest.sh newfile$(EXEEXT) \ + test-nlist$(EXEEXT) update1$(EXEEXT) update2$(EXEEXT) \ + update3$(EXEEXT) update4$(EXEEXT) run-show-die-info.sh \ +@@ -151,14 +152,14 @@ TESTS = run-arextract.sh run-arsymtest.s + run-backtrace-native-core-biarch.sh \ + run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \ + run-backtrace-core-ppc.sh run-backtrace-core-s390x.sh \ +- run-backtrace-core-s390.sh $(am__EXEEXT_2) $(am__append_8) \ +- $(am__EXEEXT_4) $(am__append_11) +-@STANDALONE_FALSE@am__append_6 = msg_tst md5-sha1-test ++ run-backtrace-core-s390.sh $(am__EXEEXT_2) $(am__append_9) \ ++ $(am__EXEEXT_4) $(am__append_12) + @STANDALONE_FALSE@am__append_7 = msg_tst md5-sha1-test +-@LZMA_TRUE@am__append_8 = run-readelf-s.sh run-dwflsyms.sh +-@HAVE_LIBASM_TRUE@am__append_9 = $(asm_TESTS) ++@STANDALONE_FALSE@am__append_8 = msg_tst md5-sha1-test ++@LZMA_TRUE@am__append_9 = run-readelf-s.sh run-dwflsyms.sh + @HAVE_LIBASM_TRUE@am__append_10 = $(asm_TESTS) +-@ENABLE_DWZ_TRUE@am__append_11 = run-readelf-dwz-multi.sh run-allfcts-multi.sh ++@HAVE_LIBASM_TRUE@am__append_11 = $(asm_TESTS) ++@ENABLE_DWZ_TRUE@am__append_12 = run-readelf-dwz-multi.sh run-allfcts-multi.sh subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ -@@ -722,6 +723,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ +@@ -780,6 +781,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ @@ -1658,7 +1837,7 @@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -@@ -751,6 +753,7 @@ SHELL = @SHELL@ +@@ -811,6 +813,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -1666,7 +1845,7 @@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -@@ -809,12 +812,11 @@ top_build_prefix = @top_build_prefix@ +@@ -870,12 +873,11 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zip_LIBS = @zip_LIBS@ @@ -1682,8 +1861,8 @@ @MUDFLAP_FALSE@libmudflap = @MUDFLAP_TRUE@libmudflap = -lmudflap COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ -@@ -824,7 +826,7 @@ CLEANFILES = *.gcno *.gcda - textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi +@@ -885,7 +887,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 -AM_LDFLAGS = $(am__append_3) $(am__append_4) diff --git a/elfutils-robustify.patch b/elfutils-robustify.patch index 56ccda8..fb392c7 100644 --- a/elfutils-robustify.patch +++ b/elfutils-robustify.patch @@ -1,6 +1,51 @@ ---- elfutils/libdwfl/ChangeLog -+++ elfutils/libdwfl/ChangeLog -@@ -256,6 +256,11 @@ +From: unknown +Subject: elfutils robustness +Upstream: no +References: https://fedorahosted.org/releases/e/l/elfutils/0.158/elfutils-robustify.patch +Signed-off-by: Tony Jones + +Various robustness fixes not deemed acceptable for inclusion into git repo. + +--- + libdwfl/ChangeLog | 5 + + libdwfl/relocate.c | 9 ++- + libelf/ChangeLog | 43 +++++++++++++++ + libelf/elf32_getphdr.c | 10 +++ + libelf/elf32_getshdr.c | 13 ++++ + libelf/elf32_newphdr.c | 6 ++ + libelf/elf32_updatefile.c | 7 ++ + libelf/elf_begin.c | 30 ++++++++++ + libelf/elf_getarsym.c | 3 + + libelf/elf_getshdrstrndx.c | 42 ++++++++++++--- + libelf/elf_newscn.c | 10 +++ + libelf/gelf_getdyn.c | 6 +- + libelf/gelf_getlib.c | 4 - + libelf/gelf_getmove.c | 4 - + libelf/gelf_getrel.c | 12 +--- + libelf/gelf_getrela.c | 12 +--- + libelf/gelf_getsym.c | 6 +- + libelf/gelf_getsyminfo.c | 4 - + libelf/gelf_getsymshndx.c | 8 +- + libelf/gelf_getversym.c | 4 - + libelf/gelf_update_dyn.c | 12 +--- + libelf/gelf_update_lib.c | 10 --- + libelf/gelf_update_move.c | 5 - + libelf/gelf_update_rel.c | 12 +--- + libelf/gelf_update_rela.c | 12 +--- + libelf/gelf_update_sym.c | 12 +--- + libelf/gelf_update_syminfo.c | 10 --- + libelf/gelf_update_symshndx.c | 12 +--- + libelf/gelf_update_versym.c | 5 - + libelf/libelfP.h | 4 + + src/ChangeLog | 29 ++++++++++ + src/elflint.c | 103 +++++++++++++++++++++++++++--------- + src/readelf.c | 117 +++++++++++++++++++++++++++++------------- + src/strip.c | 80 +++++++++++++++++++--------- + 34 files changed, 456 insertions(+), 205 deletions(-) + +--- a/libdwfl/ChangeLog ++++ b/libdwfl/ChangeLog +@@ -695,6 +695,11 @@ * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL. Reported by Kurt Roeckx . @@ -12,8 +57,8 @@ 2011-02-11 Roland McGrath * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz ---- elfutils/libdwfl/relocate.c -+++ elfutils/libdwfl/relocate.c +--- a/libdwfl/relocate.c ++++ b/libdwfl/relocate.c @@ -1,5 +1,5 @@ /* Relocate debug information. - Copyright (C) 2005-2010 Red Hat, Inc. @@ -42,9 +87,9 @@ gelf_update_shdr (scn, shdr); } ---- elfutils/libelf/ChangeLog -+++ elfutils/libelf/ChangeLog -@@ -715,10 +715,53 @@ +--- a/libelf/ChangeLog ++++ b/libelf/ChangeLog +@@ -759,10 +759,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. @@ -98,8 +143,8 @@ 2005-05-09 Ulrich Drepper * elf.h: Update from glibc. ---- elfutils/libelf/elf32_getphdr.c -+++ elfutils/libelf/elf32_getphdr.c +--- a/libelf/elf32_getphdr.c ++++ b/libelf/elf32_getphdr.c @@ -93,6 +93,16 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf) if (elf->map_address != NULL) @@ -117,8 +162,8 @@ /* All the data is already mapped. Use it. */ void *file_phdr = ((char *) elf->map_address + elf->start_offset + ehdr->e_phoff); ---- elfutils/libelf/elf32_getshdr.c -+++ elfutils/libelf/elf32_getshdr.c +--- a/libelf/elf32_getshdr.c ++++ b/libelf/elf32_getshdr.c @@ -60,7 +60,8 @@ load_shdr_wrlock (Elf_Scn *scn) goto out; @@ -146,8 +191,8 @@ ElfW2(LIBELFBITS,Shdr) *notcvt; /* All the data is already mapped. If we could use it ---- elfutils/libelf/elf32_newphdr.c -+++ elfutils/libelf/elf32_newphdr.c +--- a/libelf/elf32_newphdr.c ++++ b/libelf/elf32_newphdr.c @@ -114,6 +114,12 @@ elfw2(LIBELFBITS,newphdr) (elf, count) || count == PN_XNUM || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL) @@ -161,8 +206,8 @@ /* Allocate a new program header with the appropriate number of elements. */ result = (ElfW2(LIBELFBITS,Phdr) *) ---- elfutils/libelf/elf32_updatefile.c -+++ elfutils/libelf/elf32_updatefile.c +--- a/libelf/elf32_updatefile.c ++++ b/libelf/elf32_updatefile.c @@ -202,6 +202,9 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf /* Write all the sections. Well, only those which are modified. */ if (shnum > 0) @@ -184,8 +229,8 @@ off_t shdr_offset = elf->start_offset + ehdr->e_shoff; #if EV_NUM != 2 xfct_t shdr_fctp = __elf_xfctstom[__libelf_version - 1][EV_CURRENT - 1][ELFW(ELFCLASS, LIBELFBITS) - 1][ELF_T_SHDR]; ---- elfutils/libelf/elf_begin.c -+++ elfutils/libelf/elf_begin.c +--- a/libelf/elf_begin.c ++++ b/libelf/elf_begin.c @@ -144,7 +144,8 @@ get_shnum (void *map_address, unsigned c if (unlikely (result == 0) && ehdr.e32->e_shoff != 0) @@ -251,8 +296,8 @@ elf->state.elf64.shdr = (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff); ---- elfutils/libelf/elf_getarsym.c -+++ elfutils/libelf/elf_getarsym.c +--- a/libelf/elf_getarsym.c ++++ b/libelf/elf_getarsym.c @@ -183,6 +183,9 @@ elf_getarsym (elf, ptr) size_t index_size = atol (tmpbuf); @@ -263,8 +308,8 @@ || n * w > index_size) { /* This index table cannot be right since it does not fit into ---- elfutils/libelf/elf_getshdrstrndx.c -+++ elfutils/libelf/elf_getshdrstrndx.c +--- a/libelf/elf_getshdrstrndx.c ++++ b/libelf/elf_getshdrstrndx.c @@ -104,10 +104,25 @@ elf_getshdrstrndx (elf, dst) if (elf->map_address != NULL && elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA @@ -323,8 +368,8 @@ else { /* We avoid reading in all the section headers. Just read ---- elfutils/libelf/elf_newscn.c -+++ elfutils/libelf/elf_newscn.c +--- a/libelf/elf_newscn.c ++++ b/libelf/elf_newscn.c @@ -83,10 +83,18 @@ elf_newscn (elf) else { @@ -345,8 +390,8 @@ newp = (Elf_ScnList *) calloc (sizeof (Elf_ScnList) + ((elf->state.elf.scnincr *= 2) * sizeof (Elf_Scn)), 1); ---- elfutils/libelf/gelf_getdyn.c -+++ elfutils/libelf/gelf_getdyn.c +--- a/libelf/gelf_getdyn.c ++++ b/libelf/gelf_getdyn.c @@ -1,5 +1,5 @@ /* Get information from dynamic table at the given index. - Copyright (C) 2000, 2001, 2002 Red Hat, Inc. @@ -372,8 +417,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; ---- elfutils/libelf/gelf_getlib.c -+++ elfutils/libelf/gelf_getlib.c +--- a/libelf/gelf_getlib.c ++++ b/libelf/gelf_getlib.c @@ -1,5 +1,5 @@ /* Get library from table at the given index. - Copyright (C) 2004 Red Hat, Inc. @@ -390,8 +435,8 @@ __libelf_seterrno (ELF_E_INVALID_INDEX); else { ---- elfutils/libelf/gelf_getmove.c -+++ elfutils/libelf/gelf_getmove.c +--- a/libelf/gelf_getmove.c ++++ b/libelf/gelf_getmove.c @@ -1,5 +1,5 @@ /* Get move structure at the given index. - Copyright (C) 2000, 2001, 2002 Red Hat, Inc. @@ -408,8 +453,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; ---- elfutils/libelf/gelf_getrela.c -+++ elfutils/libelf/gelf_getrela.c +--- a/libelf/gelf_getrela.c ++++ b/libelf/gelf_getrela.c @@ -1,5 +1,5 @@ /* Get RELA relocation information at given index. - Copyright (C) 2000, 2001, 2002 Red Hat, Inc. @@ -448,8 +493,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); result = NULL; ---- elfutils/libelf/gelf_getrel.c -+++ elfutils/libelf/gelf_getrel.c +--- a/libelf/gelf_getrel.c ++++ b/libelf/gelf_getrel.c @@ -1,5 +1,5 @@ /* Get REL relocation information at given index. - Copyright (C) 2000, 2001, 2002 Red Hat, Inc. @@ -488,8 +533,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); result = NULL; ---- elfutils/libelf/gelf_getsym.c -+++ elfutils/libelf/gelf_getsym.c +--- a/libelf/gelf_getsym.c ++++ b/libelf/gelf_getsym.c @@ -1,5 +1,5 @@ /* Get symbol information from symbol table at the given index. - Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. @@ -515,8 +560,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; ---- elfutils/libelf/gelf_getsyminfo.c -+++ elfutils/libelf/gelf_getsyminfo.c +--- a/libelf/gelf_getsyminfo.c ++++ b/libelf/gelf_getsyminfo.c @@ -1,5 +1,5 @@ /* Get additional symbol information from symbol table at the given index. - Copyright (C) 2000, 2001, 2002 Red Hat, Inc. @@ -533,8 +578,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; ---- elfutils/libelf/gelf_getsymshndx.c -+++ elfutils/libelf/gelf_getsymshndx.c +--- a/libelf/gelf_getsymshndx.c ++++ b/libelf/gelf_getsymshndx.c @@ -1,6 +1,6 @@ /* Get symbol information and separate section index from symbol table at the given index. @@ -570,8 +615,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; ---- elfutils/libelf/gelf_getversym.c -+++ elfutils/libelf/gelf_getversym.c +--- a/libelf/gelf_getversym.c ++++ b/libelf/gelf_getversym.c @@ -1,5 +1,5 @@ /* Get symbol version information at the given index. - Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. @@ -588,8 +633,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); result = NULL; ---- elfutils/libelf/gelf_update_dyn.c -+++ elfutils/libelf/gelf_update_dyn.c +--- a/libelf/gelf_update_dyn.c ++++ b/libelf/gelf_update_dyn.c @@ -1,5 +1,5 @@ /* Update information in dynamic table at the given index. - Copyright (C) 2000, 2001, 2002 Red Hat, Inc. @@ -628,8 +673,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; ---- elfutils/libelf/gelf_update_lib.c -+++ elfutils/libelf/gelf_update_lib.c +--- a/libelf/gelf_update_lib.c ++++ b/libelf/gelf_update_lib.c @@ -1,5 +1,5 @@ /* Update library in table at the given index. - Copyright (C) 2004 Red Hat, Inc. @@ -659,8 +704,8 @@ __libelf_seterrno (ELF_E_INVALID_INDEX); else { ---- elfutils/libelf/gelf_update_move.c -+++ elfutils/libelf/gelf_update_move.c +--- a/libelf/gelf_update_move.c ++++ b/libelf/gelf_update_move.c @@ -1,5 +1,5 @@ /* Update move structure at the given index. - Copyright (C) 2000, 2001, 2002 Red Hat, Inc. @@ -678,8 +723,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); return 0; ---- elfutils/libelf/gelf_update_rela.c -+++ elfutils/libelf/gelf_update_rela.c +--- a/libelf/gelf_update_rela.c ++++ b/libelf/gelf_update_rela.c @@ -1,5 +1,5 @@ /* Update RELA relocation information at given index. - Copyright (C) 2000, 2001, 2002 Red Hat, Inc. @@ -718,8 +763,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; ---- elfutils/libelf/gelf_update_rel.c -+++ elfutils/libelf/gelf_update_rel.c +--- a/libelf/gelf_update_rel.c ++++ b/libelf/gelf_update_rel.c @@ -1,5 +1,5 @@ /* Update REL relocation information at given index. - Copyright (C) 2000, 2001, 2002 Red Hat, Inc. @@ -758,8 +803,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; ---- elfutils/libelf/gelf_update_sym.c -+++ elfutils/libelf/gelf_update_sym.c +--- a/libelf/gelf_update_sym.c ++++ b/libelf/gelf_update_sym.c @@ -1,5 +1,5 @@ /* Update symbol information in symbol table at the given index. - Copyright (C) 2000, 2001, 2002 Red Hat, Inc. @@ -798,8 +843,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; ---- elfutils/libelf/gelf_update_syminfo.c -+++ elfutils/libelf/gelf_update_syminfo.c +--- a/libelf/gelf_update_syminfo.c ++++ b/libelf/gelf_update_syminfo.c @@ -1,5 +1,5 @@ /* Update additional symbol information in symbol table at the given index. - Copyright (C) 2000, 2001, 2002 Red Hat, Inc. @@ -829,8 +874,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; ---- elfutils/libelf/gelf_update_symshndx.c -+++ elfutils/libelf/gelf_update_symshndx.c +--- a/libelf/gelf_update_symshndx.c ++++ b/libelf/gelf_update_symshndx.c @@ -1,6 +1,6 @@ /* Update symbol information and section index in symbol table at the given index. @@ -870,8 +915,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; ---- elfutils/libelf/gelf_update_versym.c -+++ elfutils/libelf/gelf_update_versym.c +--- a/libelf/gelf_update_versym.c ++++ b/libelf/gelf_update_versym.c @@ -1,5 +1,5 @@ /* Update symbol version information. - Copyright (C) 2001, 2002 Red Hat, Inc. @@ -889,8 +934,8 @@ { __libelf_seterrno (ELF_E_INVALID_INDEX); return 0; ---- elfutils/libelf/libelfP.h -+++ elfutils/libelf/libelfP.h +--- a/libelf/libelfP.h ++++ b/libelf/libelfP.h @@ -587,4 +587,8 @@ extern uint32_t __libelf_crc32 (uint32_t /* Align offset to 4 bytes as needed for note name and descriptor data. */ #define NOTE_ALIGN(n) (((n) + 3) & -4U) @@ -900,9 +945,9 @@ + unlikely ((data)->d_size / sizeof (type) <= (unsigned int) (ndx)) + #endif /* libelfP.h */ ---- elfutils/src/ChangeLog -+++ elfutils/src/ChangeLog -@@ -504,6 +504,12 @@ +--- a/src/ChangeLog ++++ b/src/ChangeLog +@@ -702,6 +702,12 @@ * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature. @@ -915,7 +960,7 @@ 2011-02-11 Roland McGrath * elfcmp.c (verbose): New variable. -@@ -2216,6 +2222,16 @@ +@@ -2439,6 +2445,16 @@ object symbols or symbols with unknown type. (check_rel): Likewise. @@ -932,7 +977,7 @@ 2005-06-08 Roland McGrath * readelf.c (print_ops): Add consts. -@@ -2261,6 +2277,19 @@ +@@ -2489,6 +2505,19 @@ * readelf.c (dwarf_tag_string): Add new tags. @@ -952,8 +997,8 @@ 2005-05-08 Roland McGrath * strip.c (handle_elf): Don't translate hash and versym data formats, ---- elfutils/src/elflint.c -+++ elfutils/src/elflint.c +--- a/src/elflint.c ++++ b/src/elflint.c @@ -123,6 +123,10 @@ static uint32_t shstrndx; /* Array to count references in section groups. */ static int *scnref; @@ -1227,9 +1272,9 @@ ERROR (gettext ("\ section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\n"), idx, section_name (ebl, idx), ---- elfutils/src/readelf.c -+++ elfutils/src/readelf.c -@@ -1363,6 +1363,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G +--- a/src/readelf.c ++++ b/src/readelf.c +@@ -1364,6 +1364,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G Elf32_Word *grpref = (Elf32_Word *) data->d_buf; GElf_Sym sym_mem; @@ -1238,7 +1283,7 @@ printf ((grpref[0] & GRP_COMDAT) ? ngettext ("\ \nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n", -@@ -1375,8 +1377,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G +@@ -1376,8 +1378,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 +1294,7 @@ ?: gettext (""), data->d_size / sizeof (Elf32_Word) - 1); -@@ -1527,10 +1529,12 @@ static void +@@ -1528,10 +1530,12 @@ static void handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) { int class = gelf_getclass (ebl->elf); @@ -1263,7 +1308,7 @@ /* Get the data of the section. */ data = elf_getdata (scn, NULL); -@@ -1542,21 +1546,26 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn, +@@ -1543,21 +1547,26 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn, error (EXIT_FAILURE, 0, gettext ("cannot get section header string table index")); @@ -1296,7 +1341,7 @@ { GElf_Dyn dynmem; GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dynmem); -@@ -1705,7 +1714,8 @@ static void +@@ -1706,7 +1715,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 +1351,7 @@ /* Get the data of the section. */ Elf_Data *data = elf_getdata (scn, NULL); -@@ -1891,7 +1901,8 @@ static void +@@ -1892,7 +1902,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 +1361,7 @@ /* Get the data of the section. */ Elf_Data *data = elf_getdata (scn, NULL); -@@ -2138,6 +2149,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G +@@ -2139,6 +2150,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G error (EXIT_FAILURE, 0, gettext ("cannot get section header string table index")); @@ -1330,7 +1375,7 @@ /* Now we can compute the number of entries in the section. */ unsigned int nsyms = data->d_size / (class == ELFCLASS32 ? sizeof (Elf32_Sym) -@@ -2148,15 +2166,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G +@@ -2149,15 +2167,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 +1392,7 @@ fputs_unlocked (class == ELFCLASS32 ? gettext ("\ -@@ -2392,7 +2407,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, +@@ -2393,7 +2408,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, error (EXIT_FAILURE, 0, gettext ("cannot get section header string table index")); @@ -1362,7 +1407,7 @@ printf (ngettext ("\ \nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", "\ -@@ -2403,9 +2424,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, +@@ -2404,9 +2425,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 +1418,7 @@ unsigned int offset = 0; for (int cnt = shdr->sh_info; --cnt >= 0; ) -@@ -2458,8 +2477,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G +@@ -2459,8 +2478,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G error (EXIT_FAILURE, 0, gettext ("cannot get section header string table index")); @@ -1389,7 +1434,7 @@ printf (ngettext ("\ \nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", "\ -@@ -2471,9 +2496,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G +@@ -2472,9 +2497,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 +1445,7 @@ unsigned int offset = 0; for (int cnt = shdr->sh_info; --cnt >= 0; ) -@@ -2735,25 +2758,30 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G +@@ -2736,25 +2759,30 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G filename = NULL; } @@ -1438,7 +1483,7 @@ { if (cnt % 2 == 0) printf ("\n %4d:", cnt); -@@ -2802,7 +2830,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, +@@ -2803,7 +2831,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt) ++counts[lengths[cnt]]; @@ -1457,7 +1502,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", "\ -@@ -2815,9 +2853,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, +@@ -2816,9 +2854,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, shdr->sh_addr, shdr->sh_offset, (unsigned int) shdr->sh_link, @@ -1468,7 +1513,7 @@ if (extrastr != NULL) fputs (extrastr, stdout); -@@ -3077,7 +3113,8 @@ print_liblist (Ebl *ebl) +@@ -3078,7 +3114,8 @@ print_liblist (Ebl *ebl) if (shdr != NULL && shdr->sh_type == SHT_GNU_LIBLIST) { @@ -1478,7 +1523,7 @@ printf (ngettext ("\ \nLibrary list section [%2zu] '%s' at offset %#0" PRIx64 " contains %d entry:\n", "\ -@@ -4397,6 +4434,16 @@ print_decoded_aranges_section (Ebl *ebl, +@@ -4403,6 +4440,16 @@ print_decoded_aranges_section (Ebl *ebl, return; } @@ -1495,9 +1540,9 @@ printf (ngettext ("\ \nDWARF section [%2zu] '%s' at offset %#" PRIx64 " contains %zu entry:\n", "\ ---- elfutils/src/strip.c -+++ elfutils/src/strip.c -@@ -565,6 +565,11 @@ handle_elf (int fd, Elf *elf, const char +--- a/src/strip.c ++++ b/src/strip.c +@@ -581,6 +581,11 @@ handle_elf (int fd, Elf *elf, const char goto fail_close; } @@ -1509,7 +1554,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. -@@ -586,7 +591,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -602,7 +607,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 +1563,7 @@ shdr_info[cnt].scn = scn; -@@ -599,6 +604,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -615,6 +620,7 @@ handle_elf (int fd, Elf *elf, const char shdr_info[cnt].shdr.sh_name); if (shdr_info[cnt].name == NULL) { @@ -1526,7 +1571,7 @@ error (0, 0, gettext ("illformed file '%s'"), fname); goto fail_close; } -@@ -608,6 +614,8 @@ handle_elf (int fd, Elf *elf, const char +@@ -624,6 +630,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 +1580,7 @@ /* Sections in files other than relocatable object files which are not loaded can be freely moved by us. In relocatable -@@ -620,7 +628,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -636,7 +644,7 @@ handle_elf (int fd, Elf *elf, const char appropriate reference. */ if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX)) { @@ -1544,7 +1589,7 @@ shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt; } else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP)) -@@ -637,7 +645,12 @@ handle_elf (int fd, Elf *elf, const char +@@ -653,7 +661,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 +1602,7 @@ if (inner == 1 || (inner == 2 && (grpref[0] & GRP_COMDAT) == 0)) /* If the section group contains only one element and this -@@ -648,7 +661,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -664,7 +677,7 @@ handle_elf (int fd, Elf *elf, const char } else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym)) { @@ -1566,7 +1611,7 @@ shdr_info[shdr_info[cnt].shdr.sh_link].version_idx = cnt; } -@@ -656,7 +669,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -672,7 +685,7 @@ handle_elf (int fd, Elf *elf, const char discarded right away. */ if ((shdr_info[cnt].shdr.sh_flags & SHF_GROUP) != 0) { @@ -1575,7 +1620,7 @@ if (shdr_info[shdr_info[cnt].group_idx].idx == 0) { -@@ -732,10 +745,14 @@ handle_elf (int fd, Elf *elf, const char +@@ -748,10 +761,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 +1638,7 @@ /* If a group section is marked as being removed make sure all the sections it contains are being removed, too. */ -@@ -779,7 +796,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -795,7 +812,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 +1647,7 @@ shdr_info[shdr_info[cnt].symtab_idx].data = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn, -@@ -819,6 +836,9 @@ handle_elf (int fd, Elf *elf, const char +@@ -835,6 +852,9 @@ handle_elf (int fd, Elf *elf, const char else if (scnidx == SHN_XINDEX) scnidx = xndx; @@ -1612,7 +1657,7 @@ if (shdr_info[scnidx].idx == 0) /* This symbol table has a real symbol in a discarded section. So preserve the -@@ -849,12 +869,16 @@ handle_elf (int fd, Elf *elf, const char +@@ -865,12 +885,16 @@ handle_elf (int fd, Elf *elf, const char } /* Handle references through sh_info. */ @@ -1631,7 +1676,7 @@ /* Mark the section as investigated. */ shdr_info[cnt].idx = 2; -@@ -995,7 +1019,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -1011,7 +1035,7 @@ handle_elf (int fd, Elf *elf, const char error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"), elf_errmsg (-1)); @@ -1640,7 +1685,7 @@ /* Add this name to the section header string table. */ shdr_info[cnt].se = ebl_strtabadd (shst, shdr_info[cnt].name, 0); -@@ -1032,7 +1056,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -1048,7 +1072,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 +1694,7 @@ shdr_info[cnt].data = elf_newdata (shdr_info[cnt].newscn); if (shdr_info[cnt].data == NULL) -@@ -1089,7 +1113,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -1105,7 +1129,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 +1703,7 @@ /* Finalize the string table and fill in the correct indices in the section headers. */ -@@ -1179,20 +1203,20 @@ handle_elf (int fd, Elf *elf, const char +@@ -1195,20 +1219,20 @@ handle_elf (int fd, Elf *elf, const char shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn, NULL); @@ -1682,7 +1727,7 @@ >= shdr_info[cnt].data->d_size / elsize); } -@@ -1247,7 +1271,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -1263,7 +1287,7 @@ handle_elf (int fd, Elf *elf, const char sec = shdr_info[sym->st_shndx].idx; else { @@ -1691,7 +1736,7 @@ sec = shdr_info[xshndx].idx; } -@@ -1268,7 +1292,7 @@ handle_elf (int fd, Elf *elf, const char +@@ -1284,7 +1308,7 @@ handle_elf (int fd, Elf *elf, const char nxshndx = sec; } @@ -1700,7 +1745,7 @@ if ((inner != destidx || nshndx != sym->st_shndx || (shndxdata != NULL && nxshndx != xshndx)) -@@ -1295,9 +1319,11 @@ handle_elf (int fd, Elf *elf, const char +@@ -1311,9 +1335,11 @@ handle_elf (int fd, Elf *elf, const char { size_t sidx = (sym->st_shndx != SHN_XINDEX ? sym->st_shndx : xshndx); @@ -1715,7 +1760,7 @@ } } -@@ -1485,11 +1511,11 @@ handle_elf (int fd, Elf *elf, const char +@@ -1501,11 +1527,11 @@ handle_elf (int fd, Elf *elf, const char { GElf_Sym sym_mem; GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem); @@ -1729,7 +1774,7 @@ size_t hidx = elf_hash (name) % nbucket; if (bucket[hidx] == 0) -@@ -1508,8 +1534,8 @@ handle_elf (int fd, Elf *elf, const char +@@ -1524,8 +1550,8 @@ handle_elf (int fd, Elf *elf, const char else { /* Alpha and S390 64-bit use 64-bit SHT_HASH entries. */ @@ -1740,7 +1785,7 @@ Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf; -@@ -1539,11 +1565,11 @@ handle_elf (int fd, Elf *elf, const char +@@ -1555,11 +1581,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-uninitialized.diff b/elfutils-uninitialized.diff index 8c6390e..d3b70cb 100644 --- a/elfutils-uninitialized.diff +++ b/elfutils-uninitialized.diff @@ -1,8 +1,10 @@ -Index: elfutils-0.155/libdwfl/linux-kernel-modules.c -=================================================================== ---- elfutils-0.155.orig/libdwfl/linux-kernel-modules.c -+++ elfutils-0.155/libdwfl/linux-kernel-modules.c -@@ -601,8 +601,8 @@ check_module_notes (Dwfl_Module *mod) +--- + libdwfl/linux-kernel-modules.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/libdwfl/linux-kernel-modules.c ++++ b/libdwfl/linux-kernel-modules.c +@@ -608,8 +608,8 @@ check_module_notes (Dwfl_Module *mod) int dwfl_linux_kernel_report_kernel (Dwfl *dwfl) { diff --git a/elfutils.changes b/elfutils.changes index 7a54764..88ccc67 100644 --- a/elfutils.changes +++ b/elfutils.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Tue Jan 28 19:22:04 UTC 2014 - tonyj@suse.com + +- Update to 0.158: + - libdwfl: + - dwfl_core_file_report has new parameter executable. + - New functions dwfl_module_getsymtab_first_global, + dwfl_module_getsym_info and dwfl_module_addrinfo. + - Added unwinder with type Dwfl_Thread_Callbacks, opaque types + Dwfl_Thread and Dwfl_Frame and functions dwfl_attach_state, + dwfl_pid, dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread, + dwfl_thread_state_registers, dwfl_thread_state_register_pc, + dwfl_getthread_frames, dwfl_getthreads, dwfl_thread_getframes + and dwfl_frame_pc. + - addr2line: New option -x to show the section an address was found in. + - stack: New utility that uses the new unwinder for processes and cores. + - backends: Unwinder support for i386, x86_64, s390, s390x, ppc and ppc64. + aarch64 support. + ------------------------------------------------------------------- Wed Nov 13 12:12:20 UTC 2013 - sweet_f_a@gmx.de diff --git a/elfutils.spec b/elfutils.spec index 4604dc9..98bae12 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,7 +1,7 @@ # # spec file for package elfutils # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: elfutils -Version: 0.157 +Version: 0.158 Release: 0 Summary: Higher-level library to access ELF License: SUSE-GPL-2.0-with-OSI-exception diff --git a/libebl-prototype-fix.diff b/libebl-prototype-fix.diff index b99d72e..2302226 100644 --- a/libebl-prototype-fix.diff +++ b/libebl-prototype-fix.diff @@ -4,11 +4,14 @@ References: none Update from K&R to ANSI prototype. This fix should go upstream. -Index: elfutils-0.155/libebl/eblopenbackend.c -=================================================================== ---- elfutils-0.155.orig/libebl/eblopenbackend.c -+++ elfutils-0.155/libebl/eblopenbackend.c -@@ -249,10 +249,7 @@ fill_defaults (Ebl *result) +--- + lib/dynamicsizehash.c | 5 +---- + libebl/eblopenbackend.c | 5 +---- + 2 files changed, 2 insertions(+), 8 deletions(-) + +--- a/libebl/eblopenbackend.c ++++ b/libebl/eblopenbackend.c +@@ -250,10 +250,7 @@ fill_defaults (Ebl *result) /* Find an appropriate backend for the file associated with ELF. */ static Ebl * @@ -20,10 +23,8 @@ Index: elfutils-0.155/libebl/eblopenbackend.c { Ebl *result; size_t cnt; -Index: elfutils-0.155/lib/dynamicsizehash.c -=================================================================== ---- elfutils-0.155.orig/lib/dynamicsizehash.c -+++ elfutils-0.155/lib/dynamicsizehash.c +--- a/lib/dynamicsizehash.c ++++ b/lib/dynamicsizehash.c @@ -44,10 +44,7 @@ @@ -34,5 +35,5 @@ Index: elfutils-0.155/lib/dynamicsizehash.c - TYPE val __attribute__ ((unused)); +lookup (NAME *htab, HASHTYPE hval, TYPE val __attribute__((unused))) { - /* First hash function: simply take the modul but prevent zero. */ - size_t idx = 1 + hval % htab->size; + /* First hash function: simply take the modul but prevent zero. Small values + can skip the division, which helps performance when this is common. */