From 4ca17f9275c81f27498b7ac07d9fe7e8193fdd71 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Wed, 16 Aug 2017 04:31:18 -0400 Subject: elfutils: 0.168 -> 0.170 The 0.170 Fixed CVE issues - CVE-2017-7608 - CVE-2017-7612 - CVE-2017-7611 - CVE-2017-7610 - CVE-2016-10255 - CVE-2017-7613 - CVE-2017-7609 - CVE-2016-10254 - CVE-2017-7607 Rebase patches to 0.170 - dso-link-change.patch -> 0001 - Fix_elf_cvt_gunhash.patch -> 0002 - fixheadercheck.patch -> 0003 - 0001-remove-the-unneed-checking.patch -> 0004 - 0001-fix-a-stack-usage-warning.patch -> 0005 - aarch64_uio.patch -> 0006 - shadow.patch -> 0007 - 0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch -> 0008 - debian/mips_backend.diff -> debian/mips_backend.patch Drop obsolete patches - 0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch Upstream fixed it https://sourceware.org/git/?p=elfutils.git;a=commit;h=7114c513fbebcca8b76796b7f64b57447ba383e1 - Fix_one_GCC7_warning.patch It is a backported patch https://sourceware.org/git/?p=elfutils.git;a=commit;h=93c51144c3f664d4e9709da75a1d0fa00ea0fe95 - Drop debian patches, they modify test case. debian/testsuite-ignore-elflint.diff debian/kfreebsd_path.patch debian/hurd_path.patch debian/ignore_strmerge.diff Signed-off-by: Hongxu Jia Signed-off-by: Richard Purdie --- ...de-alternatives-for-glibc-assumptions-hel.patch | 1051 -------------------- ...m-Silence-Werror-maybe-uninitialized-fals.patch | 35 - .../0001-fix-a-stack-usage-warning.patch | 28 - .../0001-remove-the-unneed-checking.patch | 38 - .../elfutils-0.168/Fix_one_GCC7_warning.patch | 44 - .../elfutils/elfutils-0.168/aarch64_uio.patch | 47 - ...ferences-between-mips-machine-identifiers.patch | 35 - ...-support-for-mips64-abis-in-mips_retval.c.patch | 171 ---- .../0003-Add-mips-n64-relocation-format-hack.patch | 229 ----- .../elfutils-0.168/debian/arm_backend.diff | 603 ----------- .../elfutils-0.168/debian/hppa_backend.diff | 802 --------------- .../elfutils/elfutils-0.168/debian/hurd_path.patch | 17 - .../elfutils-0.168/debian/ignore_strmerge.diff | 14 - .../elfutils-0.168/debian/kfreebsd_path.patch | 20 - .../elfutils-0.168/debian/mips_backend.diff | 686 ------------- .../elfutils-0.168/debian/mips_readelf_w.patch | 25 - .../debian/testsuite-ignore-elflint.diff | 42 - .../elfutils/elfutils-0.168/fallthrough.patch | 36 - .../elfutils/elfutils-0.168/fixheadercheck.patch | 23 - .../elfutils/elfutils-0.168/shadow.patch | 23 - .../elfutils/elfutils/Fix_elf_cvt_gunhash.patch | 29 - .../elfutils/elfutils/dso-link-change.patch | 32 - meta/recipes-devtools/elfutils/elfutils_0.168.bb | 84 -- meta/recipes-devtools/elfutils/elfutils_0.170.bb | 78 ++ .../elfutils/files/0001-dso-link-change.patch | 52 + ...-elf_cvt_gunhash-if-dest-and-src-are-same.patch | 42 + .../elfutils/files/0003-fixheadercheck.patch | 40 + .../0004-Disable-the-test-to-convert-euc-jp.patch | 44 + .../files/0005-fix-a-stack-usage-warning.patch | 35 + .../files/0006-Fix-build-on-aarch64-musl.patch | 61 ++ ...-path-where-we-have-str-as-uninitialized-.patch | 45 + ...de-alternatives-for-glibc-assumptions-hel.patch | 1031 +++++++++++++++++++ ...ferences-between-mips-machine-identifiers.patch | 35 + ...-support-for-mips64-abis-in-mips_retval.c.patch | 171 ++++ .../0003-Add-mips-n64-relocation-format-hack.patch | 229 +++++ .../elfutils/files/debian/arm_backend.diff | 603 +++++++++++ .../elfutils/files/debian/fallthrough.patch | 36 + .../elfutils/files/debian/hppa_backend.diff | 802 +++++++++++++++ .../elfutils/files/debian/mips_backend.patch | 715 +++++++++++++ .../elfutils/files/debian/mips_readelf_w.patch | 25 + 40 files changed, 4044 insertions(+), 4114 deletions(-) delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/debian/hppa_backend.diff delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/debian/hurd_path.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/debian/ignore_strmerge.diff delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/debian/kfreebsd_path.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_backend.diff delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_readelf_w.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/debian/testsuite-ignore-elflint.diff delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/fixheadercheck.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/shadow.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils_0.168.bb create mode 100644 meta/recipes-devtools/elfutils/elfutils_0.170.bb create mode 100644 meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch create mode 100644 meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch create mode 100644 meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch create mode 100644 meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch create mode 100644 meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch create mode 100644 meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch create mode 100644 meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch create mode 100644 meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch create mode 100644 meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch create mode 100644 meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch create mode 100644 meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch create mode 100644 meta/recipes-devtools/elfutils/files/debian/arm_backend.diff create mode 100644 meta/recipes-devtools/elfutils/files/debian/fallthrough.patch create mode 100644 meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff create mode 100644 meta/recipes-devtools/elfutils/files/debian/mips_backend.patch create mode 100644 meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch deleted file mode 100644 index 020ffa141b..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch +++ /dev/null @@ -1,1051 +0,0 @@ -From 054fedda5ab9b84160d40d90cb967f2f5822b889 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 31 Dec 2015 06:35:34 +0000 -Subject: [PATCH] build: Provide alternatives for glibc assumptions helps - compiling it on musl - -Upstream-Status: Pending -Signed-off-by: Khem Raj - -Rebase to 0.68 -Signed-off-by: Hongxu Jia ---- - Makefile.am | 2 +- - lib/color.c | 3 ++- - lib/crc32_file.c | 1 + - lib/fixedsizehash.h | 1 - - lib/system.h | 10 ++++++++++ - lib/xmalloc.c | 2 +- - libasm/asm_end.c | 2 +- - libasm/asm_newscn.c | 2 +- - libcpu/i386_gendis.c | 2 +- - libcpu/i386_lex.c | 2 +- - libcpu/i386_parse.c | 2 +- - libdw/Makefile.am | 4 +++- - libdw/libdw_alloc.c | 2 +- - libdwfl/dwfl_build_id_find_elf.c | 3 ++- - libdwfl/dwfl_error.c | 4 +++- - libdwfl/dwfl_module_getdwarf.c | 1 + - libdwfl/find-debuginfo.c | 2 +- - libdwfl/libdwfl_crc32_file.c | 10 ++++++++++ - libdwfl/linux-kernel-modules.c | 1 + - libebl/eblopenbackend.c | 2 +- - libelf/elf.h | 8 ++++++-- - libelf/libelf.h | 1 + - libelf/libelfP.h | 1 + - src/addr2line.c | 2 +- - src/ar.c | 2 +- - src/arlib.c | 2 +- - src/arlib2.c | 2 +- - src/elfcmp.c | 2 +- - src/elflint.c | 2 +- - src/findtextrel.c | 2 +- - src/nm.c | 2 +- - src/objdump.c | 2 +- - src/ranlib.c | 2 +- - src/readelf.c | 2 +- - src/size.c | 2 +- - src/stack.c | 2 +- - src/strings.c | 2 +- - src/strip.c | 2 +- - src/unstrip.c | 2 +- - tests/addrscopes.c | 2 +- - tests/allregs.c | 2 +- - tests/backtrace-data.c | 2 +- - tests/backtrace-dwarf.c | 2 +- - tests/backtrace.c | 2 +- - tests/buildid.c | 2 +- - tests/debugaltlink.c | 2 +- - tests/debuglink.c | 2 +- - tests/deleted.c | 2 +- - tests/dwfl-addr-sect.c | 2 +- - tests/dwfl-bug-addr-overflow.c | 2 +- - tests/dwfl-bug-fd-leak.c | 2 +- - tests/dwfl-bug-getmodules.c | 2 +- - tests/dwfl-report-elf-align.c | 2 +- - tests/dwfllines.c | 2 +- - tests/dwflmodtest.c | 2 +- - tests/dwflsyms.c | 2 +- - tests/early-offscn.c | 2 +- - tests/ecp.c | 2 +- - tests/find-prologues.c | 2 +- - tests/funcretval.c | 2 +- - tests/funcscopes.c | 2 +- - tests/getsrc_die.c | 2 +- - tests/line2addr.c | 2 +- - tests/low_high_pc.c | 2 +- - tests/md5-sha1-test.c | 2 +- - tests/rdwrmmap.c | 2 +- - tests/saridx.c | 2 +- - tests/sectiondump.c | 2 +- - tests/varlocs.c | 2 +- - tests/vdsosyms.c | 2 +- - 70 files changed, 98 insertions(+), 64 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 2ff444e..41f77df 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -28,7 +28,7 @@ pkginclude_HEADERS = version.h - - # Add doc back when we have some real content. - SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \ -- backends src po tests -+ backends po tests - - EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ - COPYING COPYING-GPLV2 COPYING-LGPLV3 -diff --git a/lib/color.c b/lib/color.c -index fde2d9d..73292ac 100644 ---- a/lib/color.c -+++ b/lib/color.c -@@ -32,12 +32,13 @@ - #endif - - #include --#include -+#include - #include - #include - #include - #include - #include "libeu.h" -+#include "system.h" - - - /* Prototype for option handler. */ -diff --git a/lib/crc32_file.c b/lib/crc32_file.c -index a8434d4..57e4298 100644 ---- a/lib/crc32_file.c -+++ b/lib/crc32_file.c -@@ -35,6 +35,7 @@ - #include - #include - #include -+#include "system.h" - - int - crc32_file (int fd, uint32_t *resp) -diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h -index dac2a5f..43016fc 100644 ---- a/lib/fixedsizehash.h -+++ b/lib/fixedsizehash.h -@@ -30,7 +30,6 @@ - #include - #include - #include --#include - - #include - -diff --git a/lib/system.h b/lib/system.h -index ccd99d6..0e93e60 100644 ---- a/lib/system.h -+++ b/lib/system.h -@@ -55,6 +55,16 @@ - #else - # error "Unknown byte order" - #endif -+#ifndef TEMP_FAILURE_RETRY -+#define TEMP_FAILURE_RETRY(expression) \ -+ (__extension__ \ -+ ({ long int __result; \ -+ do __result = (long int) (expression); \ -+ while (__result == -1L && errno == EINTR); \ -+ __result; })) -+#endif -+ -+#define error(status, errno, ...) err(status, __VA_ARGS__) - - #ifndef MAX - #define MAX(m, n) ((m) < (n) ? (n) : (m)) -diff --git a/lib/xmalloc.c b/lib/xmalloc.c -index 0cde384..217b054 100644 ---- a/lib/xmalloc.c -+++ b/lib/xmalloc.c -@@ -30,7 +30,7 @@ - # include - #endif - --#include -+#include - #include - #include - #include -diff --git a/libasm/asm_end.c b/libasm/asm_end.c -index 191a535..bf5ab06 100644 ---- a/libasm/asm_end.c -+++ b/libasm/asm_end.c -@@ -32,7 +32,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c -index ddbb25d..74a598d 100644 ---- a/libasm/asm_newscn.c -+++ b/libasm/asm_newscn.c -@@ -32,7 +32,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/libcpu/i386_gendis.c b/libcpu/i386_gendis.c -index aae5eae..6d76016 100644 ---- a/libcpu/i386_gendis.c -+++ b/libcpu/i386_gendis.c -@@ -31,7 +31,7 @@ - # include - #endif - --#include -+#include - #include - #include - #include -diff --git a/libcpu/i386_lex.c b/libcpu/i386_lex.c -index b670608..b842c25 100644 ---- a/libcpu/i386_lex.c -+++ b/libcpu/i386_lex.c -@@ -592,7 +592,7 @@ char *i386_text; - #endif - - #include --#include -+#include - #include - - #include -diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c -index 724addf..5b67802 100644 ---- a/libcpu/i386_parse.c -+++ b/libcpu/i386_parse.c -@@ -107,7 +107,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/libdw/Makefile.am b/libdw/Makefile.am -index 082d96c..51cbea0 100644 ---- a/libdw/Makefile.am -+++ b/libdw/Makefile.am -@@ -102,6 +102,8 @@ endif - libdw_pic_a_SOURCES = - am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os) - -+fts_LDADD = -lfts -+ - libdw_so_SOURCES = - libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ - ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \ -@@ -112,7 +114,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ - -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ - -Wl,--version-script,$<,--no-undefined \ - -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ -- -ldl -lz $(argp_LDADD) $(zip_LIBS) -+ -ldl -lz $(argp_LDADD) $(zip_LIBS) $(fts_LDADD) - @$(textrel_check) - $(AM_V_at)ln -fs $@ $@.$(VERSION) - -diff --git a/libdw/libdw_alloc.c b/libdw/libdw_alloc.c -index 28a8cf6..29aeb3f 100644 ---- a/libdw/libdw_alloc.c -+++ b/libdw/libdw_alloc.c -@@ -31,7 +31,7 @@ - # include - #endif - --#include -+#include - #include - #include - #include "libdwP.h" -diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c -index 903e193..b00d10c 100644 ---- a/libdwfl/dwfl_build_id_find_elf.c -+++ b/libdwfl/dwfl_build_id_find_elf.c -@@ -27,6 +27,7 @@ - not, see . */ - - #include "libdwflP.h" -+#include "system.h" - #include - #include - #include -@@ -94,7 +95,7 @@ __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name, - { - if (*file_name != NULL) - free (*file_name); -- *file_name = canonicalize_file_name (name); -+ *file_name = realpath (name, NULL); - if (*file_name == NULL) - { - *file_name = name; -diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c -index 7bcf61c..c345797 100644 ---- a/libdwfl/dwfl_error.c -+++ b/libdwfl/dwfl_error.c -@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error) - const char * - dwfl_errmsg (int error) - { -+ static __thread char s[64] = ""; - if (error == 0 || error == -1) - { - int last_error = global_error; -@@ -154,7 +155,8 @@ dwfl_errmsg (int error) - switch (error &~ 0xffff) - { - case OTHER_ERROR (ERRNO): -- return strerror_r (error & 0xffff, "bad", 0); -+ strerror_r (error & 0xffff, s, sizeof(s)); -+ return s; - case OTHER_ERROR (LIBELF): - return elf_errmsg (error & 0xffff); - case OTHER_ERROR (LIBDW): -diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c -index 0e8810b..82ad665 100644 ---- a/libdwfl/dwfl_module_getdwarf.c -+++ b/libdwfl/dwfl_module_getdwarf.c -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include "system.h" - #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */ - #include "../libelf/libelfP.h" - -diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c -index 80515db..80b0148 100644 ---- a/libdwfl/find-debuginfo.c -+++ b/libdwfl/find-debuginfo.c -@@ -385,7 +385,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod, - /* If FILE_NAME is a symlink, the debug file might be associated - with the symlink target name instead. */ - -- char *canon = canonicalize_file_name (file_name); -+ char *canon = realpath (file_name, NULL); - if (canon != NULL && strcmp (file_name, canon)) - fd = find_debuginfo_in_path (mod, canon, - debuglink_file, debuglink_crc, -diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c -index 6b6b7d3..debc4a4 100644 ---- a/libdwfl/libdwfl_crc32_file.c -+++ b/libdwfl/libdwfl_crc32_file.c -@@ -31,6 +31,16 @@ - - #define crc32_file attribute_hidden __libdwfl_crc32_file - #define crc32 __libdwfl_crc32 -+ -+#ifndef TEMP_FAILURE_RETRY -+#define TEMP_FAILURE_RETRY(expression) \ -+ (__extension__ \ -+ ({ long int __result; \ -+ do __result = (long int) (expression); \ -+ while (__result == -1L && errno == EINTR); \ -+ __result; })) -+#endif -+ - #define LIB_SYSTEM_H 1 - #include - #include "../lib/crc32_file.c" -diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c -index 9cd8ea9..4dbf4c5 100644 ---- a/libdwfl/linux-kernel-modules.c -+++ b/libdwfl/linux-kernel-modules.c -@@ -36,6 +36,7 @@ - #include - - #include "libdwflP.h" -+#include "system.h" - #include - #include - #include -diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c -index 34d439a..56d2345 100644 ---- a/libebl/eblopenbackend.c -+++ b/libebl/eblopenbackend.c -@@ -32,7 +32,7 @@ - - #include - #include --#include -+#include - #include - #include - #include -diff --git a/libelf/elf.h b/libelf/elf.h -index 74654d6..81eee8b 100644 ---- a/libelf/elf.h -+++ b/libelf/elf.h -@@ -21,7 +21,9 @@ - - #include - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - /* Standard ELF types. */ - -@@ -3704,6 +3706,8 @@ enum - #define R_BPF_NONE 0 /* No reloc */ - #define R_BPF_MAP_FD 1 /* Map fd to pointer */ - --__END_DECLS -+#ifdef __cplusplus -+} -+#endif - - #endif /* elf.h */ -diff --git a/libelf/libelf.h b/libelf/libelf.h -index c0d6389..38a68fd 100644 ---- a/libelf/libelf.h -+++ b/libelf/libelf.h -@@ -29,6 +29,7 @@ - #ifndef _LIBELF_H - #define _LIBELF_H 1 - -+#include - #include - #include - -diff --git a/libelf/libelfP.h b/libelf/libelfP.h -index 4459982..1296f20 100644 ---- a/libelf/libelfP.h -+++ b/libelf/libelfP.h -@@ -36,6 +36,7 @@ - - #include - #include -+#include - - #include - #include -diff --git a/src/addr2line.c b/src/addr2line.c -index 0222088..cd6a9a6 100644 ---- a/src/addr2line.c -+++ b/src/addr2line.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/ar.c b/src/ar.c -index f2f322b..6e70031 100644 ---- a/src/ar.c -+++ b/src/ar.c -@@ -22,7 +22,7 @@ - - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/arlib.c b/src/arlib.c -index e0839aa..1143658 100644 ---- a/src/arlib.c -+++ b/src/arlib.c -@@ -21,7 +21,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/src/arlib2.c b/src/arlib2.c -index 553fc57..46443d0 100644 ---- a/src/arlib2.c -+++ b/src/arlib2.c -@@ -20,7 +20,7 @@ - # include - #endif - --#include -+#include - #include - #include - #include -diff --git a/src/elfcmp.c b/src/elfcmp.c -index 401ab31..873d253 100644 ---- a/src/elfcmp.c -+++ b/src/elfcmp.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/elflint.c b/src/elflint.c -index 7d3f227..074d21c 100644 ---- a/src/elflint.c -+++ b/src/elflint.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/findtextrel.c b/src/findtextrel.c -index dc41502..325888c 100644 ---- a/src/findtextrel.c -+++ b/src/findtextrel.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/nm.c b/src/nm.c -index c54e96f..9e031d9 100644 ---- a/src/nm.c -+++ b/src/nm.c -@@ -26,7 +26,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/objdump.c b/src/objdump.c -index fff4b81..4b1f966 100644 ---- a/src/objdump.c -+++ b/src/objdump.c -@@ -21,7 +21,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/src/ranlib.c b/src/ranlib.c -index 41a3bcf..0c7da2c 100644 ---- a/src/ranlib.c -+++ b/src/ranlib.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/readelf.c b/src/readelf.c -index d18a4b7..a6cfb35 100644 ---- a/src/readelf.c -+++ b/src/readelf.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/size.c b/src/size.c -index de0d791..4639d42 100644 ---- a/src/size.c -+++ b/src/size.c -@@ -21,7 +21,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/src/stack.c b/src/stack.c -index a5a7beb..4c075bc 100644 ---- a/src/stack.c -+++ b/src/stack.c -@@ -18,7 +18,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/strings.c b/src/strings.c -index 49aab8b..09d5b1c 100644 ---- a/src/strings.c -+++ b/src/strings.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/strip.c b/src/strip.c -index a875ddf..fd76f7f 100644 ---- a/src/strip.c -+++ b/src/strip.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/src/unstrip.c b/src/unstrip.c -index d838ae9..0108272 100644 ---- a/src/unstrip.c -+++ b/src/unstrip.c -@@ -31,7 +31,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/tests/addrscopes.c b/tests/addrscopes.c -index 791569f..54f4311 100644 ---- a/tests/addrscopes.c -+++ b/tests/addrscopes.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - - -diff --git a/tests/allregs.c b/tests/allregs.c -index 286f7e3..c9de089 100644 ---- a/tests/allregs.c -+++ b/tests/allregs.c -@@ -21,7 +21,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c -index b7158da..354fa6a 100644 ---- a/tests/backtrace-data.c -+++ b/tests/backtrace-data.c -@@ -27,7 +27,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #if defined(__x86_64__) && defined(__linux__) -diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c -index a644c8a..b8cbe27 100644 ---- a/tests/backtrace-dwarf.c -+++ b/tests/backtrace-dwarf.c -@@ -22,7 +22,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/tests/backtrace.c b/tests/backtrace.c -index 1ff6353..47e3f7b 100644 ---- a/tests/backtrace.c -+++ b/tests/backtrace.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #ifdef __linux__ -diff --git a/tests/buildid.c b/tests/buildid.c -index 87c1877..2953e6b 100644 ---- a/tests/buildid.c -+++ b/tests/buildid.c -@@ -23,7 +23,7 @@ - #include ELFUTILS_HEADER(elf) - #include ELFUTILS_HEADER(dwelf) - #include --#include -+#include - #include - #include - #include -diff --git a/tests/debugaltlink.c b/tests/debugaltlink.c -index 6d97d50..ee7e559 100644 ---- a/tests/debugaltlink.c -+++ b/tests/debugaltlink.c -@@ -23,7 +23,7 @@ - #include ELFUTILS_HEADER(dw) - #include ELFUTILS_HEADER(dwelf) - #include --#include -+#include - #include - #include - #include -diff --git a/tests/debuglink.c b/tests/debuglink.c -index 935d102..741cb81 100644 ---- a/tests/debuglink.c -+++ b/tests/debuglink.c -@@ -21,7 +21,7 @@ - #include - #include ELFUTILS_HEADER(dwelf) - #include --#include -+#include - #include - #include - #include -diff --git a/tests/deleted.c b/tests/deleted.c -index 6be35bc..0190711 100644 ---- a/tests/deleted.c -+++ b/tests/deleted.c -@@ -21,7 +21,7 @@ - #include - #include - #include --#include -+#include - #include - #ifdef __linux__ - #include -diff --git a/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c -index 21e470a..1ea1e3b 100644 ---- a/tests/dwfl-addr-sect.c -+++ b/tests/dwfl-addr-sect.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include ELFUTILS_HEADER(dwfl) -diff --git a/tests/dwfl-bug-addr-overflow.c b/tests/dwfl-bug-addr-overflow.c -index aa8030e..02c8bef 100644 ---- a/tests/dwfl-bug-addr-overflow.c -+++ b/tests/dwfl-bug-addr-overflow.c -@@ -20,7 +20,7 @@ - #include - #include - #include --#include -+#include - #include - #include ELFUTILS_HEADER(dwfl) - -diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c -index 689cdd7..5973da3 100644 ---- a/tests/dwfl-bug-fd-leak.c -+++ b/tests/dwfl-bug-fd-leak.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -diff --git a/tests/dwfl-bug-getmodules.c b/tests/dwfl-bug-getmodules.c -index 1ee989f..fd62e65 100644 ---- a/tests/dwfl-bug-getmodules.c -+++ b/tests/dwfl-bug-getmodules.c -@@ -18,7 +18,7 @@ - #include - #include ELFUTILS_HEADER(dwfl) - --#include -+#include - - static const Dwfl_Callbacks callbacks = - { -diff --git a/tests/dwfl-report-elf-align.c b/tests/dwfl-report-elf-align.c -index a4e97d3..f471587 100644 ---- a/tests/dwfl-report-elf-align.c -+++ b/tests/dwfl-report-elf-align.c -@@ -20,7 +20,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/tests/dwfllines.c b/tests/dwfllines.c -index 90379dd..cbdf6c4 100644 ---- a/tests/dwfllines.c -+++ b/tests/dwfllines.c -@@ -27,7 +27,7 @@ - #include - #include - #include --#include -+#include - - int - main (int argc, char *argv[]) -diff --git a/tests/dwflmodtest.c b/tests/dwflmodtest.c -index 0027f96..e68d3bc 100644 ---- a/tests/dwflmodtest.c -+++ b/tests/dwflmodtest.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include ELFUTILS_HEADER(dwfl) -diff --git a/tests/dwflsyms.c b/tests/dwflsyms.c -index 49ac334..cf07830 100644 ---- a/tests/dwflsyms.c -+++ b/tests/dwflsyms.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - - static const char * -diff --git a/tests/early-offscn.c b/tests/early-offscn.c -index 924cb9e..6f60d5a 100644 ---- a/tests/early-offscn.c -+++ b/tests/early-offscn.c -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/tests/ecp.c b/tests/ecp.c -index 38a6859..743cea5 100644 ---- a/tests/ecp.c -+++ b/tests/ecp.c -@@ -20,7 +20,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/tests/find-prologues.c b/tests/find-prologues.c -index ba8ae37..76f5f04 100644 ---- a/tests/find-prologues.c -+++ b/tests/find-prologues.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -diff --git a/tests/funcretval.c b/tests/funcretval.c -index 8d19d11..c8aaa93 100644 ---- a/tests/funcretval.c -+++ b/tests/funcretval.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -diff --git a/tests/funcscopes.c b/tests/funcscopes.c -index 9c90185..dbccb89 100644 ---- a/tests/funcscopes.c -+++ b/tests/funcscopes.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -diff --git a/tests/getsrc_die.c b/tests/getsrc_die.c -index 055aede..9c394dd 100644 ---- a/tests/getsrc_die.c -+++ b/tests/getsrc_die.c -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/tests/line2addr.c b/tests/line2addr.c -index e0d65d3..9bf0023 100644 ---- a/tests/line2addr.c -+++ b/tests/line2addr.c -@@ -26,7 +26,7 @@ - #include - #include - #include --#include -+#include - - - static void -diff --git a/tests/low_high_pc.c b/tests/low_high_pc.c -index d0f4302..8da4fbd 100644 ---- a/tests/low_high_pc.c -+++ b/tests/low_high_pc.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -diff --git a/tests/md5-sha1-test.c b/tests/md5-sha1-test.c -index d50355e..3c41f40 100644 ---- a/tests/md5-sha1-test.c -+++ b/tests/md5-sha1-test.c -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - - #include "md5.h" - #include "sha1.h" -diff --git a/tests/rdwrmmap.c b/tests/rdwrmmap.c -index 6f027df..1ce5e6e 100644 ---- a/tests/rdwrmmap.c -+++ b/tests/rdwrmmap.c -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -diff --git a/tests/saridx.c b/tests/saridx.c -index 8a450d8..b387801 100644 ---- a/tests/saridx.c -+++ b/tests/saridx.c -@@ -17,7 +17,7 @@ - - #include - --#include -+#include - #include - #include - #include -diff --git a/tests/sectiondump.c b/tests/sectiondump.c -index 3033fed..8e888db 100644 ---- a/tests/sectiondump.c -+++ b/tests/sectiondump.c -@@ -18,7 +18,7 @@ - #include - - #include --#include -+#include - #include - #include - #include -diff --git a/tests/varlocs.c b/tests/varlocs.c -index c3fba89..e043ea2 100644 ---- a/tests/varlocs.c -+++ b/tests/varlocs.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c -index b876c10..afb2823 100644 ---- a/tests/vdsosyms.c -+++ b/tests/vdsosyms.c -@@ -18,7 +18,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include --- -2.8.1 - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch deleted file mode 100644 index 3754c1c361..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 668accf322fd7185e273bfd50b84320e71d9de5a Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Fri, 10 Apr 2015 00:29:18 +0200 -Subject: [PATCH] elf_getarsym: Silence -Werror=maybe-uninitialized false - positive - -Upstream-Status: Pending -Signed-off-by: Martin Jansa ---- - libelf/elf_getarsym.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c -index d0bb28a..08954d2 100644 ---- a/libelf/elf_getarsym.c -+++ b/libelf/elf_getarsym.c -@@ -165,8 +165,13 @@ elf_getarsym (elf, ptr) - int w = index64_p ? 8 : 4; - - /* We have an archive. The first word in there is the number of -- entries in the table. */ -- uint64_t n; -+ entries in the table. -+ Set to SIZE_MAX just to silence -Werror=maybe-uninitialized -+ elf_getarsym.c:290:9: error: 'n' may be used uninitialized in this function -+ The read_number_entries function doesn't initialize n only when returning -+ -1 which in turn ensures to jump over usage of this uninitialized variable. -+ */ -+ uint64_t n = SIZE_MAX; - size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr); - if (read_number_entries (&n, elf, &off, index64_p) < 0) - { --- -2.3.5 - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch deleted file mode 100644 index 6923bf7053..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch +++ /dev/null @@ -1,28 +0,0 @@ -[PATCH] fix a stack-usage warning - -Upstream-Status: Pending - -not use a variable to as a array size, otherwise the warning to error that -stack usage might be unbounded [-Werror=stack-usage=] will happen - -Signed-off-by: Roy Li ---- - backends/ppc_initreg.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c -index 64f5379..52dde3e 100644 ---- a/backends/ppc_initreg.c -+++ b/backends/ppc_initreg.c -@@ -93,7 +93,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), - return false; - } - const size_t gprs = sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr); -- Dwarf_Word dwarf_regs[gprs]; -+ Dwarf_Word dwarf_regs[sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr)]; - for (unsigned gpr = 0; gpr < gprs; gpr++) - dwarf_regs[gpr] = user_regs.r.gpr[gpr]; - if (! setfunc (0, gprs, dwarf_regs, arg)) --- -1.9.1 - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch deleted file mode 100644 index 5be92d705a..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch +++ /dev/null @@ -1,38 +0,0 @@ -Disable the test to convert euc-jp - -Remove the test "Test against HP-UX 11.11 bug: -No converter from EUC-JP to UTF-8 is provided" -since we don't support HP-UX and if the euc-jp is not -installed on the host, the dependence will be built without -iconv support and will cause guild-native building fail. - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Roy Li ---- - m4/iconv.m4 | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/m4/iconv.m4 b/m4/iconv.m4 -index a503646..299f1eb 100644 ---- a/m4/iconv.m4 -+++ b/m4/iconv.m4 -@@ -159,6 +159,7 @@ int main () - } - } - #endif -+#if 0 - /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is - provided. */ - if (/* Try standardized names. */ -@@ -170,6 +171,7 @@ int main () - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - result |= 16; -+#endif - return result; - }]])], - [am_cv_func_iconv_works=yes], --- -2.0.1 - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch deleted file mode 100644 index d88f4ebd0c..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 93c51144c3f664d4e9709da75a1d0fa00ea0fe95 Mon Sep 17 00:00:00 2001 -From: Mark Wielaard -Date: Sun, 12 Feb 2017 21:51:34 +0100 -Subject: [PATCH] libasm: Fix one GCC7 -Wformat-truncation=2 warning. - -Make sure that if we have really lots of labels the tempsym doesn't get -truncated because it is too small to hold the whole name. - -This doesn't enable -Wformat-truncation=2 or fix other "issues" pointed -out by enabling this warning because there are currently some issues -with it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448 - -Signed-off-by: Mark Wielaard - -Upstream-Status: Backport (https://sourceware.org/git/?p=elfutils.git;a=commit;h=93c51144c3f664d4e9709da75a1d0fa00ea0fe95) -Signed-off-by: Joshua Lock - ---- - libasm/ChangeLog | 6 +++++- - libasm/asm_newsym.c | 6 ++++-- - 2 files changed, 9 insertions(+), 3 deletions(-) - -Index: elfutils-0.168/libasm/asm_newsym.c -=================================================================== ---- elfutils-0.168.orig/libasm/asm_newsym.c -+++ elfutils-0.168/libasm/asm_newsym.c -@@ -1,5 +1,5 @@ - /* Define new symbol for current position in given section. -- Copyright (C) 2002, 2005, 2016 Red Hat, Inc. -+ Copyright (C) 2002, 2005, 2016, 2017 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper , 2002. - -@@ -44,7 +44,9 @@ AsmSym_t * - asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size, - int type, int binding) - { --#define TEMPSYMLEN 10 -+/* We don't really expect labels with many digits, but in theory it could -+ be 10 digits (plus ".L" and a zero terminator). */ -+#define TEMPSYMLEN 13 - char tempsym[TEMPSYMLEN]; - AsmSym_t *result; - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch deleted file mode 100644 index 38dc57befc..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch +++ /dev/null @@ -1,47 +0,0 @@ -Fix build on aarch64/musl - -Errors - -invalid operands to binary & (have 'long double' and 'unsigned int') - -error: redefinition - of 'struct iovec' - struct iovec { void *iov_base; size_t iov_len; }; - ^ -Upstream-Status: Pending -Signed-off-by: Khem Raj -Index: elfutils-0.163/backends/aarch64_initreg.c -=================================================================== ---- elfutils-0.163.orig/backends/aarch64_initreg.c -+++ elfutils-0.163/backends/aarch64_initreg.c -@@ -33,7 +33,7 @@ - #include "system.h" - #include - #ifdef __aarch64__ --# include -+# include - # include - # include - /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ -@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t - - Dwarf_Word dwarf_fregs[32]; - for (int r = 0; r < 32; r++) -- dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF; -+ dwarf_fregs[r] = (unsigned int)fregs.vregs[r] & 0xFFFFFFFF; - - if (! setfunc (64, 32, dwarf_fregs, arg)) - return false; -Index: elfutils-0.163/backends/arm_initreg.c -=================================================================== ---- elfutils-0.163.orig/backends/arm_initreg.c -+++ elfutils-0.163/backends/arm_initreg.c -@@ -37,7 +37,7 @@ - #endif - - #ifdef __aarch64__ --# include -+# include - # include - # include - /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch deleted file mode 100644 index e0291b4cf3..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001 -From: James Cowgill -Date: Mon, 5 Jan 2015 15:16:58 +0000 -Subject: [PATCH 1/3] Ignore differences between mips machine identifiers - -Little endian binaries actually use EM_MIPS so you can't tell the endianness -from the elf machine id. Also, the EM_MIPS_RS3_LE machine is dead anyway (the -kernel will not load binaries containing it). - -Signed-off-by: James Cowgill - -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia - ---- - backends/mips_init.c | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -Index: b/backends/mips_init.c -=================================================================== ---- a/backends/mips_init.c -+++ b/backends/mips_init.c -@@ -45,11 +45,7 @@ mips_init (Elf *elf __attribute__ ((unus - return NULL; - - /* We handle it. */ -- if (machine == EM_MIPS) -- eh->name = "MIPS R3000 big-endian"; -- else if (machine == EM_MIPS_RS3_LE) -- eh->name = "MIPS R3000 little-endian"; -- -+ eh->name = "MIPS"; - mips_init_reloc (eh); - HOOK (eh, reloc_simple_type); - HOOK (eh, return_value_location); diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch deleted file mode 100644 index b17498f5fa..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch +++ /dev/null @@ -1,171 +0,0 @@ -From fdaab18a65ed2529656baa64cb6169f34d7e507b Mon Sep 17 00:00:00 2001 -From: James Cowgill -Date: Mon, 5 Jan 2015 15:17:01 +0000 -Subject: [PATCH 2/3] Add support for mips64 abis in mips_retval.c - -Signed-off-by: James Cowgill - -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia ---- - backends/mips_retval.c | 104 ++++++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 94 insertions(+), 10 deletions(-) - -diff --git a/backends/mips_retval.c b/backends/mips_retval.c -index 33f12a7..d5c6ef0 100644 ---- a/backends/mips_retval.c -+++ b/backends/mips_retval.c -@@ -91,6 +91,8 @@ enum mips_abi find_mips_abi(Elf *elf) - default: - if ((elf_flags & EF_MIPS_ABI2)) - return MIPS_ABI_N32; -+ else if ((ehdr->e_ident[EI_CLASS] == ELFCLASS64)) -+ return MIPS_ABI_N64; - } - - /* GCC creates a pseudo-section whose name describes the ABI. */ -@@ -195,6 +197,57 @@ static const Dwarf_Op loc_aggregate[] = - }; - #define nloc_aggregate 1 - -+/* Test if a struct member is a float */ -+static int is_float_child(Dwarf_Die *childdie) -+{ -+ /* Test if this is actually a struct member */ -+ if (dwarf_tag(childdie) != DW_TAG_member) -+ return 0; -+ -+ /* Get type of member */ -+ Dwarf_Attribute attr_mem; -+ Dwarf_Die child_type_mem; -+ Dwarf_Die *child_typedie = -+ dwarf_formref_die(dwarf_attr_integrate(childdie, -+ DW_AT_type, -+ &attr_mem), &child_type_mem); -+ -+ if (dwarf_tag(child_typedie) != DW_TAG_base_type) -+ return 0; -+ -+ /* Get base subtype */ -+ Dwarf_Word encoding; -+ if (dwarf_formudata (dwarf_attr_integrate (child_typedie, -+ DW_AT_encoding, -+ &attr_mem), &encoding) != 0) -+ return 0; -+ -+ return encoding == DW_ATE_float; -+} -+ -+/* Returns the number of fpregs which can be returned in the given struct */ -+static int get_struct_fpregs(Dwarf_Die *structtypedie) -+{ -+ Dwarf_Die child_mem; -+ int fpregs = 0; -+ -+ /* Get first structure member */ -+ if (dwarf_child(structtypedie, &child_mem) != 0) -+ return 0; -+ -+ do -+ { -+ /* Ensure this register is a float */ -+ if (!is_float_child(&child_mem)) -+ return 0; -+ -+ fpregs++; -+ } -+ while (dwarf_siblingof (&child_mem, &child_mem) == 0); -+ -+ return fpregs; -+} -+ - int - mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) - { -@@ -240,6 +293,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) - tag = dwarf_tag (typedie); - } - -+ Dwarf_Word size; - switch (tag) - { - case -1: -@@ -258,8 +312,6 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) - case DW_TAG_enumeration_type: - case DW_TAG_pointer_type: - case DW_TAG_ptr_to_member_type: -- { -- Dwarf_Word size; - if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size, - &attr_mem), &size) != 0) - { -@@ -289,7 +341,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) - if (size <= 4*regsize && abi == MIPS_ABI_O32) - return nloc_fpregquad; - -- goto aggregate; -+ goto large; - } - } - *locp = ABI_LOC(loc_intreg, regsize); -@@ -298,18 +350,50 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) - if (size <= 2*regsize) - return nloc_intregpair; - -- /* Else fall through. Shouldn't happen though (at least with gcc) */ -- } -+ /* Else pass in memory. Shouldn't happen though (at least with gcc) */ -+ goto large; - - case DW_TAG_structure_type: - case DW_TAG_class_type: - case DW_TAG_union_type: -- case DW_TAG_array_type: -- aggregate: -- /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */ -- if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64)) -- return -2; -+ /* Handle special cases for structures <= 128 bytes in newer ABIs */ -+ if (abi == MIPS_ABI_EABI32 || abi == MIPS_ABI_EABI64 || -+ abi == MIPS_ABI_N32 || abi == MIPS_ABI_N64) -+ { -+ if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 16) -+ { -+ /* -+ * Special case in N64 / N32 - -+ * structures containing only floats are returned in fp regs. -+ * Everything else is returned in integer regs. -+ */ -+ if (tag != DW_TAG_union_type && -+ (abi == MIPS_ABI_N32 || abi == MIPS_ABI_N64)) -+ { -+ int num_fpregs = get_struct_fpregs(typedie); -+ if (num_fpregs == 1 || num_fpregs == 2) -+ { -+ *locp = loc_fpreg; -+ if (num_fpregs == 1) -+ return nloc_fpreg; -+ else -+ return nloc_fpregpair; -+ } -+ } -+ -+ *locp = loc_intreg; -+ if (size <= 8) -+ return nloc_intreg; -+ else -+ return nloc_intregpair; -+ } -+ } -+ -+ /* Fallthrough to handle large types */ - -+ case DW_TAG_array_type: -+ large: -+ /* Return large structures in memory */ - *locp = loc_aggregate; - return nloc_aggregate; - } --- -2.1.4 - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch deleted file mode 100644 index 2a5f8628d9..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch +++ /dev/null @@ -1,229 +0,0 @@ -From 59d4b8c48e5040af7e02b34eb26ea602ec82a38e Mon Sep 17 00:00:00 2001 -From: James Cowgill -Date: Mon, 5 Jan 2015 15:17:02 +0000 -Subject: [PATCH 3/3] Add mips n64 relocation format hack - -MIPSEL N64 ELF files use a slightly different format for storing relocation -entries which is incompatible with the normal R_SYM / R_INFO macros. -To workaround this, we rearrange the bytes in the relocation's r_info field -when reading and writing the relocations. - -This patch also ensures that strip.c sets the correct value of e_machine -before manipulating relocations so that these changes take effect. - -Signed-off-by: James Cowgill - -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia ---- - libelf/gelf_getrel.c | 25 +++++++++++++++++++++++-- - libelf/gelf_getrela.c | 25 +++++++++++++++++++++++-- - libelf/gelf_update_rel.c | 20 +++++++++++++++++++- - libelf/gelf_update_rela.c | 20 +++++++++++++++++++- - src/strip.c | 17 +++++++++++++++++ - 5 files changed, 101 insertions(+), 6 deletions(-) - -Index: b/libelf/gelf_getrel.c -=================================================================== ---- a/libelf/gelf_getrel.c -+++ b/libelf/gelf_getrel.c -@@ -36,6 +36,7 @@ - - #include "libelfP.h" - -+#define EF_MIPS_ABI 0x0000F000 - - GElf_Rel * - gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst) -@@ -89,8 +90,28 @@ gelf_getrel (Elf_Data *data, int ndx, GE - result = NULL; - } - else -- result = memcpy (dst, &((Elf64_Rel *) data_scn->d.d_buf)[ndx], -- sizeof (Elf64_Rel)); -+ { -+ GElf_Ehdr hdr; -+ result = memcpy (dst, &((Elf64_Rel *) data_scn->d.d_buf)[ndx], -+ sizeof (Elf64_Rel)); -+ -+ if (gelf_getehdr(scn->elf, &hdr) != NULL && -+ hdr.e_ident[EI_DATA] == ELFDATA2LSB && -+ hdr.e_machine == EM_MIPS && -+ (hdr.e_flags & EF_MIPS_ABI) == 0) -+ { -+ /* -+ * The relocation format is mangled on MIPSEL N64 -+ * We'll adjust it so at least R_SYM will work on it -+ */ -+ GElf_Xword r_info = dst->r_info; -+ dst->r_info = (r_info << 32) | -+ ((r_info >> 8) & 0xFF000000) | -+ ((r_info >> 24) & 0x00FF0000) | -+ ((r_info >> 40) & 0x0000FF00) | -+ ((r_info >> 56) & 0x000000FF); -+ } -+ } - } - - rwlock_unlock (scn->elf->lock); -Index: b/libelf/gelf_getrela.c -=================================================================== ---- a/libelf/gelf_getrela.c -+++ b/libelf/gelf_getrela.c -@@ -36,6 +36,7 @@ - - #include "libelfP.h" - -+#define EF_MIPS_ABI 0x0000F000 - - GElf_Rela * - gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst) -@@ -90,8 +91,28 @@ gelf_getrela (Elf_Data *data, int ndx, G - result = NULL; - } - else -- result = memcpy (dst, &((Elf64_Rela *) data_scn->d.d_buf)[ndx], -- sizeof (Elf64_Rela)); -+ { -+ GElf_Ehdr hdr; -+ result = memcpy (dst, &((Elf64_Rela *) data_scn->d.d_buf)[ndx], -+ sizeof (Elf64_Rela)); -+ -+ if (gelf_getehdr(scn->elf, &hdr) != NULL && -+ hdr.e_ident[EI_DATA] == ELFDATA2LSB && -+ hdr.e_machine == EM_MIPS && -+ (hdr.e_flags & EF_MIPS_ABI) == 0) -+ { -+ /* -+ * The relocation format is mangled on MIPSEL N64 -+ * We'll adjust it so at least R_SYM will work on it -+ */ -+ GElf_Xword r_info = dst->r_info; -+ dst->r_info = (r_info << 32) | -+ ((r_info >> 8) & 0xFF000000) | -+ ((r_info >> 24) & 0x00FF0000) | -+ ((r_info >> 40) & 0x0000FF00) | -+ ((r_info >> 56) & 0x000000FF); -+ } -+ } - } - - rwlock_unlock (scn->elf->lock); -Index: b/libelf/gelf_update_rel.c -=================================================================== ---- a/libelf/gelf_update_rel.c -+++ b/libelf/gelf_update_rel.c -@@ -36,6 +36,7 @@ - - #include "libelfP.h" - -+#define EF_MIPS_ABI 0x0000F000 - - int - gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src) -@@ -86,6 +87,9 @@ gelf_update_rel (Elf_Data *dst, int ndx, - } - else - { -+ GElf_Ehdr hdr; -+ GElf_Rel value = *src; -+ - /* Check whether we have to resize the data buffer. */ - if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d)) - { -@@ -93,7 +97,21 @@ gelf_update_rel (Elf_Data *dst, int ndx, - goto out; - } - -- ((Elf64_Rel *) data_scn->d.d_buf)[ndx] = *src; -+ if (gelf_getehdr(scn->elf, &hdr) != NULL && -+ hdr.e_ident[EI_DATA] == ELFDATA2LSB && -+ hdr.e_machine == EM_MIPS && -+ (hdr.e_flags & EF_MIPS_ABI) == 0) -+ { -+ /* Undo the MIPSEL N64 hack from gelf_getrel */ -+ GElf_Xword r_info = value.r_info; -+ value.r_info = (r_info >> 32) | -+ ((r_info << 8) & 0x000000FF00000000) | -+ ((r_info << 24) & 0x0000FF0000000000) | -+ ((r_info << 40) & 0x00FF000000000000) | -+ ((r_info << 56) & 0xFF00000000000000); -+ } -+ -+ ((Elf64_Rel *) data_scn->d.d_buf)[ndx] = value; - } - - result = 1; -Index: b/libelf/gelf_update_rela.c -=================================================================== ---- a/libelf/gelf_update_rela.c -+++ b/libelf/gelf_update_rela.c -@@ -36,6 +36,7 @@ - - #include "libelfP.h" - -+#define EF_MIPS_ABI 0x0000F000 - - int - gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src) -@@ -89,6 +90,9 @@ gelf_update_rela (Elf_Data *dst, int ndx - } - else - { -+ GElf_Ehdr hdr; -+ GElf_Rela value = *src; -+ - /* Check whether we have to resize the data buffer. */ - if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d)) - { -@@ -96,7 +100,21 @@ gelf_update_rela (Elf_Data *dst, int ndx - goto out; - } - -- ((Elf64_Rela *) data_scn->d.d_buf)[ndx] = *src; -+ if (gelf_getehdr(scn->elf, &hdr) != NULL && -+ hdr.e_ident[EI_DATA] == ELFDATA2LSB && -+ hdr.e_machine == EM_MIPS && -+ (hdr.e_flags & EF_MIPS_ABI) == 0) -+ { -+ /* Undo the MIPSEL N64 hack from gelf_getrel */ -+ GElf_Xword r_info = value.r_info; -+ value.r_info = (r_info >> 32) | -+ ((r_info << 8) & 0x000000FF00000000) | -+ ((r_info << 24) & 0x0000FF0000000000) | -+ ((r_info << 40) & 0x00FF000000000000) | -+ ((r_info << 56) & 0xFF00000000000000); -+ } -+ -+ ((Elf64_Rela *) data_scn->d.d_buf)[ndx] = value; - } - - result = 1; -Index: b/src/strip.c -=================================================================== ---- a/src/strip.c -+++ b/src/strip.c -@@ -532,6 +532,23 @@ handle_elf (int fd, Elf *elf, const char - goto fail; - } - -+ /* Copy identity part of the ELF header now */ -+ newehdr = gelf_getehdr (newelf, &newehdr_mem); -+ if (newehdr == NULL) -+ INTERNAL_ERROR (fname); -+ -+ memcpy (newehdr->e_ident, ehdr->e_ident, EI_NIDENT); -+ newehdr->e_type = ehdr->e_type; -+ newehdr->e_machine = ehdr->e_machine; -+ newehdr->e_version = ehdr->e_version; -+ -+ if (gelf_update_ehdr (newelf, newehdr) == 0) -+ { -+ error (0, 0, gettext ("%s: error while creating ELF header: %s"), -+ fname, elf_errmsg (-1)); -+ return 1; -+ } -+ - /* Copy over the old program header if needed. */ - if (ehdr->e_type != ET_REL) - for (cnt = 0; cnt < phnum; ++cnt) diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff deleted file mode 100644 index 50f4b059e3..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff +++ /dev/null @@ -1,603 +0,0 @@ -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia - -Index: b/backends/arm_init.c -=================================================================== ---- a/backends/arm_init.c -+++ b/backends/arm_init.c -@@ -35,20 +35,31 @@ - #define RELOC_PREFIX R_ARM_ - #include "libebl_CPU.h" - -+#include "libebl_arm.h" -+ - /* This defines the common reloc hooks based on arm_reloc.def. */ - #include "common-reloc.c" - - - const char * --arm_init (Elf *elf __attribute__ ((unused)), -+arm_init (Elf *elf, - GElf_Half machine __attribute__ ((unused)), - Ebl *eh, - size_t ehlen) - { -+ int soft_float = 0; -+ - /* Check whether the Elf_BH object has a sufficent size. */ - if (ehlen < sizeof (Ebl)) - return NULL; - -+ if (elf) { -+ GElf_Ehdr ehdr_mem; -+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); -+ if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT)) -+ soft_float = 1; -+ } -+ - /* We handle it. */ - eh->name = "ARM"; - arm_init_reloc (eh); -@@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unuse - HOOK (eh, core_note); - HOOK (eh, auxv_info); - HOOK (eh, check_object_attribute); -- HOOK (eh, return_value_location); -+ if (soft_float) -+ eh->return_value_location = arm_return_value_location_soft; -+ else -+ eh->return_value_location = arm_return_value_location_hard; - HOOK (eh, abi_cfi); - HOOK (eh, check_reloc_target_type); - HOOK (eh, symbol_type_name); -Index: b/backends/arm_regs.c -=================================================================== ---- a/backends/arm_regs.c -+++ b/backends/arm_regs.c -@@ -31,6 +31,7 @@ - #endif - - #include -+#include - #include - - #define BACKEND arm_ -@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute_ - break; - - case 16 + 0 ... 16 + 7: -+ /* AADWARF says that there are no registers in that range, -+ * but gcc maps FPA registers here -+ */ - regno += 96 - 16; - /* Fall through. */ - case 96 + 0 ... 96 + 7: -@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute_ - namelen = 2; - break; - -+ case 64 + 0 ... 64 + 9: -+ *setname = "VFP"; -+ *bits = 32; -+ *type = DW_ATE_float; -+ name[0] = 's'; -+ name[1] = regno - 64 + '0'; -+ namelen = 2; -+ break; -+ -+ case 64 + 10 ... 64 + 31: -+ *setname = "VFP"; -+ *bits = 32; -+ *type = DW_ATE_float; -+ name[0] = 's'; -+ name[1] = (regno - 64) / 10 + '0'; -+ name[2] = (regno - 64) % 10 + '0'; -+ namelen = 3; -+ break; -+ -+ case 104 + 0 ... 104 + 7: -+ /* XXX TODO: -+ * This can be either intel wireless MMX general purpose/control -+ * registers or xscale accumulator, which have different usage. -+ * We only have the intel wireless MMX here now. -+ * The name needs to be changed for the xscale accumulator too. */ -+ *setname = "MMX"; -+ *type = DW_ATE_unsigned; -+ *bits = 32; -+ memcpy(name, "wcgr", 4); -+ name[4] = regno - 104 + '0'; -+ namelen = 5; -+ break; -+ -+ case 112 + 0 ... 112 + 9: -+ *setname = "MMX"; -+ *type = DW_ATE_unsigned; -+ *bits = 64; -+ name[0] = 'w'; -+ name[1] = 'r'; -+ name[2] = regno - 112 + '0'; -+ namelen = 3; -+ break; -+ -+ case 112 + 10 ... 112 + 15: -+ *setname = "MMX"; -+ *type = DW_ATE_unsigned; -+ *bits = 64; -+ name[0] = 'w'; -+ name[1] = 'r'; -+ name[2] = '1'; -+ name[3] = regno - 112 - 10 + '0'; -+ namelen = 4; -+ break; -+ - case 128: -+ *setname = "state"; - *type = DW_ATE_unsigned; - return stpcpy (name, "spsr") + 1 - name; - -+ case 129: -+ *setname = "state"; -+ *type = DW_ATE_unsigned; -+ return stpcpy(name, "spsr_fiq") + 1 - name; -+ -+ case 130: -+ *setname = "state"; -+ *type = DW_ATE_unsigned; -+ return stpcpy(name, "spsr_irq") + 1 - name; -+ -+ case 131: -+ *setname = "state"; -+ *type = DW_ATE_unsigned; -+ return stpcpy(name, "spsr_abt") + 1 - name; -+ -+ case 132: -+ *setname = "state"; -+ *type = DW_ATE_unsigned; -+ return stpcpy(name, "spsr_und") + 1 - name; -+ -+ case 133: -+ *setname = "state"; -+ *type = DW_ATE_unsigned; -+ return stpcpy(name, "spsr_svc") + 1 - name; -+ -+ case 144 ... 150: -+ *setname = "integer"; -+