From 071b6a0c3cdeb3635a8ccfbc708573723308dd68 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 11 May 2016 10:35:07 -0700 Subject: elfutils: Upgrade to 0.166 Has many fixes for compiling it with gcc-6 Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- ...ferences-between-mips-machine-identifiers.patch | 34 - ...de-alternatives-for-glibc-assumptions-hel.patch | 1163 -------------------- ...m-Silence-Werror-maybe-uninitialized-fals.patch | 35 - .../0001-fix-a-stack-usage-warning.patch | 28 - .../0001-remove-the-unneed-checking.patch | 38 - ...-support-for-mips64-abis-in-mips_retval.c.patch | 168 --- .../0003-Add-mips-n64-relocation-format-hack.patch | 226 ---- .../elfutils/elfutils-0.164/aarch64_uio.patch | 47 - .../elfutils/elfutils-0.164/arm_backend.diff | 600 ---------- .../elfutils/elfutils-0.164/fixheadercheck.patch | 23 - .../elfutils/elfutils-0.164/hppa_backend.diff | 799 -------------- .../elfutils/elfutils-0.164/kfreebsd_path.patch | 15 - .../elfutils/elfutils-0.164/m68k_backend.diff | 492 --------- .../elfutils/elfutils-0.164/mips_backend.diff | 711 ------------ .../elfutils/elfutils-0.164/mips_readelf_w.patch | 22 - .../elfutils/elfutils-0.164/shadow.patch | 23 - .../elfutils-0.164/testsuite-ignore-elflint.diff | 39 - .../elfutils/elfutils-0.164/uclibc-support.patch | 129 --- ...ferences-between-mips-machine-identifiers.patch | 34 + ...de-alternatives-for-glibc-assumptions-hel.patch | 1163 ++++++++++++++++++++ ...m-Silence-Werror-maybe-uninitialized-fals.patch | 35 + .../0001-fix-a-stack-usage-warning.patch | 28 + .../0001-remove-the-unneed-checking.patch | 38 + ...-support-for-mips64-abis-in-mips_retval.c.patch | 168 +++ .../0003-Add-mips-n64-relocation-format-hack.patch | 226 ++++ .../elfutils/elfutils-0.166/aarch64_uio.patch | 47 + .../elfutils/elfutils-0.166/arm_backend.diff | 600 ++++++++++ .../elfcmp-fix-self-comparision.patch | 41 + .../elfutils/elfutils-0.166/fixheadercheck.patch | 23 + .../elfutils/elfutils-0.166/hppa_backend.diff | 799 ++++++++++++++ .../elfutils/elfutils-0.166/kfreebsd_path.patch | 15 + .../elfutils/elfutils-0.166/m68k_backend.diff | 492 +++++++++ .../elfutils/elfutils-0.166/mips_backend.diff | 711 ++++++++++++ .../elfutils/elfutils-0.166/mips_readelf_w.patch | 22 + .../elfutils/elfutils-0.166/shadow.patch | 23 + .../elfutils-0.166/testsuite-ignore-elflint.diff | 39 + .../elfutils/elfutils-0.166/uclibc-support.patch | 128 +++ meta/recipes-devtools/elfutils/elfutils_0.164.bb | 89 -- meta/recipes-devtools/elfutils/elfutils_0.166.bb | 89 ++ 39 files changed, 4721 insertions(+), 4681 deletions(-) delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/0001-fix-a-stack-usage-warning.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/0001-remove-the-unneed-checking.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/arm_backend.diff delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/fixheadercheck.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/hppa_backend.diff delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/kfreebsd_path.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/m68k_backend.diff delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/mips_backend.diff delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/mips_readelf_w.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/testsuite-ignore-elflint.diff delete mode 100644 meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/0001-Ignore-differences-between-mips-machine-identifiers.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/0001-fix-a-stack-usage-warning.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/0001-remove-the-unneed-checking.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/0003-Add-mips-n64-relocation-format-hack.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/aarch64_uio.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/arm_backend.diff create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/elfcmp-fix-self-comparision.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/fixheadercheck.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/hppa_backend.diff create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/kfreebsd_path.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/m68k_backend.diff create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/mips_backend.diff create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/mips_readelf_w.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/shadow.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/testsuite-ignore-elflint.diff create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.166/uclibc-support.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils_0.164.bb create mode 100644 meta/recipes-devtools/elfutils/elfutils_0.166.bb diff --git a/meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch deleted file mode 100644 index 3f110f98fc..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch +++ /dev/null @@ -1,34 +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 ---- - backends/mips_init.c | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/backends/mips_init.c b/backends/mips_init.c -index 7429a89..d10e940 100644 ---- a/backends/mips_init.c -+++ b/backends/mips_init.c -@@ -46,11 +46,7 @@ mips_init (elf, machine, eh, ehlen) - 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); --- -2.1.4 - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch deleted file mode 100644 index c8d1c89901..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch +++ /dev/null @@ -1,1163 +0,0 @@ -From 4b0fe80b3951f044c1c1b14d1d7f5f0b8ab67507 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 - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - Makefile.am | 2 +- - lib/color.c | 2 +- - lib/crc32_file.c | 4 +++- - lib/fixedsizehash.h | 4 ++-- - lib/system.h | 11 +++++++++++ - 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 | 2 +- - libdw/libdw_alloc.c | 3 ++- - libdwfl/Makefile.am | 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 +- - libebl/eblwstrtab.c | 2 +- - libelf/elf.h | 9 ++++++--- - 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/i386_ld.c | 2 +- - src/ld.c | 2 +- - src/ldgeneric.c | 2 +- - src/ldlex.c | 2 +- - src/ldscript.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 +- - 77 files changed, 109 insertions(+), 73 deletions(-) - -Index: elfutils-0.164/Makefile.am -=================================================================== ---- elfutils-0.164.orig/Makefile.am -+++ elfutils-0.164/Makefile.am -@@ -24,7 +24,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 -Index: elfutils-0.164/lib/color.c -=================================================================== ---- elfutils-0.164.orig/lib/color.c -+++ elfutils-0.164/lib/color.c -@@ -32,7 +32,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/lib/crc32_file.c -=================================================================== ---- elfutils-0.164.orig/lib/crc32_file.c -+++ elfutils-0.164/lib/crc32_file.c -@@ -30,12 +30,14 @@ - # include - #endif - --#include "system.h" - #include - #include -+#include - #include - #include - -+#include "system.h" -+ - int - crc32_file (int fd, uint32_t *resp) - { -Index: elfutils-0.164/lib/fixedsizehash.h -=================================================================== ---- elfutils-0.164.orig/lib/fixedsizehash.h -+++ elfutils-0.164/lib/fixedsizehash.h -@@ -30,12 +30,12 @@ - #include - #include - #include --#include - #include - - #include - --#define CONCAT(t1,t2) __CONCAT (t1,t2) -+#define CONCAT1(x,y) x##y -+#define CONCAT(x,y) CONCAT1(x,y) - - /* Before including this file the following macros must be defined: - -Index: elfutils-0.164/lib/system.h -=================================================================== ---- elfutils-0.164.orig/lib/system.h -+++ elfutils-0.164/lib/system.h -@@ -49,6 +49,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__) - - extern void *xmalloc (size_t) __attribute__ ((__malloc__)); - extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__)); -Index: elfutils-0.164/lib/xmalloc.c -=================================================================== ---- elfutils-0.164.orig/lib/xmalloc.c -+++ elfutils-0.164/lib/xmalloc.c -@@ -30,7 +30,7 @@ - # include - #endif - --#include -+#include - #include - #include - #include -Index: elfutils-0.164/libasm/asm_end.c -=================================================================== ---- elfutils-0.164.orig/libasm/asm_end.c -+++ elfutils-0.164/libasm/asm_end.c -@@ -32,7 +32,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/libasm/asm_newscn.c -=================================================================== ---- elfutils-0.164.orig/libasm/asm_newscn.c -+++ elfutils-0.164/libasm/asm_newscn.c -@@ -32,7 +32,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/libcpu/i386_gendis.c -=================================================================== ---- elfutils-0.164.orig/libcpu/i386_gendis.c -+++ elfutils-0.164/libcpu/i386_gendis.c -@@ -31,7 +31,7 @@ - # include - #endif - --#include -+#include - #include - #include - #include -Index: elfutils-0.164/libcpu/i386_lex.c -=================================================================== ---- elfutils-0.164.orig/libcpu/i386_lex.c -+++ elfutils-0.164/libcpu/i386_lex.c -@@ -571,7 +571,7 @@ char *i386_text; - #endif - - #include --#include -+#include - #include - - #include -Index: elfutils-0.164/libcpu/i386_parse.c -=================================================================== ---- elfutils-0.164.orig/libcpu/i386_parse.c -+++ elfutils-0.164/libcpu/i386_parse.c -@@ -107,7 +107,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/libdw/Makefile.am -=================================================================== ---- elfutils-0.164.orig/libdw/Makefile.am -+++ elfutils-0.164/libdw/Makefile.am -@@ -117,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l - -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ - -Wl,--version-script,$<,--no-undefined \ - -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ -- -ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS) -+ -ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS) -lfts -largp - @$(textrel_check) - $(AM_V_at)ln -fs $@ $@.$(VERSION) - -Index: elfutils-0.164/libdw/libdw_alloc.c -=================================================================== ---- elfutils-0.164.orig/libdw/libdw_alloc.c -+++ elfutils-0.164/libdw/libdw_alloc.c -@@ -31,11 +31,12 @@ - # include - #endif - --#include -+#include - #include - #include - #include - #include "libdwP.h" -+#include "system.h" - - - void * -Index: elfutils-0.164/libdwfl/Makefile.am -=================================================================== ---- elfutils-0.164.orig/libdwfl/Makefile.am -+++ elfutils-0.164/libdwfl/Makefile.am -@@ -86,6 +86,8 @@ libelf = ../libelf/libelf.so - libebl = ../libebl/libebl.a - libeu = ../lib/libeu.a - -+LDADD = -lfts -+ - libdwfl_pic_a_SOURCES = - am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_SOURCES:.c=.os) - -Index: elfutils-0.164/libdwfl/dwfl_build_id_find_elf.c -=================================================================== ---- elfutils-0.164.orig/libdwfl/dwfl_build_id_find_elf.c -+++ elfutils-0.164/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 - { - 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; -Index: elfutils-0.164/libdwfl/dwfl_error.c -=================================================================== ---- elfutils-0.164.orig/libdwfl/dwfl_error.c -+++ elfutils-0.164/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): -Index: elfutils-0.164/libdwfl/dwfl_module_getdwarf.c -=================================================================== ---- elfutils-0.164.orig/libdwfl/dwfl_module_getdwarf.c -+++ elfutils-0.164/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" - -Index: elfutils-0.164/libdwfl/find-debuginfo.c -=================================================================== ---- elfutils-0.164.orig/libdwfl/find-debuginfo.c -+++ elfutils-0.164/libdwfl/find-debuginfo.c -@@ -372,7 +372,7 @@ dwfl_standard_find_debuginfo (Dwfl_Modul - /* 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, -Index: elfutils-0.164/libdwfl/libdwfl_crc32_file.c -=================================================================== ---- elfutils-0.164.orig/libdwfl/libdwfl_crc32_file.c -+++ elfutils-0.164/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" -Index: elfutils-0.164/libdwfl/linux-kernel-modules.c -=================================================================== ---- elfutils-0.164.orig/libdwfl/linux-kernel-modules.c -+++ elfutils-0.164/libdwfl/linux-kernel-modules.c -@@ -34,6 +34,7 @@ - #include - - #include "libdwflP.h" -+#include "system.h" - #include - #include - #include -Index: elfutils-0.164/libebl/eblopenbackend.c -=================================================================== ---- elfutils-0.164.orig/libebl/eblopenbackend.c -+++ elfutils-0.164/libebl/eblopenbackend.c -@@ -32,7 +32,7 @@ - - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/libebl/eblwstrtab.c -=================================================================== ---- elfutils-0.164.orig/libebl/eblwstrtab.c -+++ elfutils-0.164/libebl/eblwstrtab.c -@@ -305,7 +305,7 @@ copystrings (struct Ebl_WStrent *nodep, - - /* Process the current node. */ - nodep->offset = *offsetp; -- *freep = wmempcpy (*freep, nodep->string, nodep->len); -+ *freep = wmemcpy (*freep, nodep->string, nodep->len) + nodep->len; - *offsetp += nodep->len * sizeof (wchar_t); - - for (subs = nodep->next; subs != NULL; subs = subs->next) -Index: elfutils-0.164/libelf/elf.h -=================================================================== ---- elfutils-0.164.orig/libelf/elf.h -+++ elfutils-0.164/libelf/elf.h -@@ -21,7 +21,9 @@ - - #include - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - /* Standard ELF types. */ - -@@ -3552,7 +3554,8 @@ enum - - #define R_TILEGX_NUM 130 - -- --__END_DECLS -+#ifdef __cplusplus -+} -+#endif - - #endif /* elf.h */ -Index: elfutils-0.164/libelf/libelf.h -=================================================================== ---- elfutils-0.164.orig/libelf/libelf.h -+++ elfutils-0.164/libelf/libelf.h -@@ -29,6 +29,7 @@ - #ifndef _LIBELF_H - #define _LIBELF_H 1 - -+#include - #include - #include - -Index: elfutils-0.164/libelf/libelfP.h -=================================================================== ---- elfutils-0.164.orig/libelf/libelfP.h -+++ elfutils-0.164/libelf/libelfP.h -@@ -36,6 +36,7 @@ - - #include - #include -+#include - - #include - #include -Index: elfutils-0.164/src/addr2line.c -=================================================================== ---- elfutils-0.164.orig/src/addr2line.c -+++ elfutils-0.164/src/addr2line.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/ar.c -=================================================================== ---- elfutils-0.164.orig/src/ar.c -+++ elfutils-0.164/src/ar.c -@@ -22,7 +22,7 @@ - - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/arlib.c -=================================================================== ---- elfutils-0.164.orig/src/arlib.c -+++ elfutils-0.164/src/arlib.c -@@ -21,7 +21,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/arlib2.c -=================================================================== ---- elfutils-0.164.orig/src/arlib2.c -+++ elfutils-0.164/src/arlib2.c -@@ -20,7 +20,7 @@ - # include - #endif - --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/elfcmp.c -=================================================================== ---- elfutils-0.164.orig/src/elfcmp.c -+++ elfutils-0.164/src/elfcmp.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/elflint.c -=================================================================== ---- elfutils-0.164.orig/src/elflint.c -+++ elfutils-0.164/src/elflint.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/findtextrel.c -=================================================================== ---- elfutils-0.164.orig/src/findtextrel.c -+++ elfutils-0.164/src/findtextrel.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/i386_ld.c -=================================================================== ---- elfutils-0.164.orig/src/i386_ld.c -+++ elfutils-0.164/src/i386_ld.c -@@ -20,7 +20,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/ld.c -=================================================================== ---- elfutils-0.164.orig/src/ld.c -+++ elfutils-0.164/src/ld.c -@@ -21,7 +21,7 @@ - - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/ldgeneric.c -=================================================================== ---- elfutils-0.164.orig/src/ldgeneric.c -+++ elfutils-0.164/src/ldgeneric.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/ldlex.c -=================================================================== ---- elfutils-0.164.orig/src/ldlex.c -+++ elfutils-0.164/src/ldlex.c -@@ -1099,7 +1099,7 @@ char *ldtext; - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/ldscript.c -=================================================================== ---- elfutils-0.164.orig/src/ldscript.c -+++ elfutils-0.164/src/ldscript.c -@@ -95,7 +95,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/nm.c -=================================================================== ---- elfutils-0.164.orig/src/nm.c -+++ elfutils-0.164/src/nm.c -@@ -26,7 +26,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/objdump.c -=================================================================== ---- elfutils-0.164.orig/src/objdump.c -+++ elfutils-0.164/src/objdump.c -@@ -21,7 +21,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/ranlib.c -=================================================================== ---- elfutils-0.164.orig/src/ranlib.c -+++ elfutils-0.164/src/ranlib.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/readelf.c -=================================================================== ---- elfutils-0.164.orig/src/readelf.c -+++ elfutils-0.164/src/readelf.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/size.c -=================================================================== ---- elfutils-0.164.orig/src/size.c -+++ elfutils-0.164/src/size.c -@@ -21,7 +21,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/stack.c -=================================================================== ---- elfutils-0.164.orig/src/stack.c -+++ elfutils-0.164/src/stack.c -@@ -18,7 +18,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/strings.c -=================================================================== ---- elfutils-0.164.orig/src/strings.c -+++ elfutils-0.164/src/strings.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/strip.c -=================================================================== ---- elfutils-0.164.orig/src/strip.c -+++ elfutils-0.164/src/strip.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/src/unstrip.c -=================================================================== ---- elfutils-0.164.orig/src/unstrip.c -+++ elfutils-0.164/src/unstrip.c -@@ -31,7 +31,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/addrscopes.c -=================================================================== ---- elfutils-0.164.orig/tests/addrscopes.c -+++ elfutils-0.164/tests/addrscopes.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - - -Index: elfutils-0.164/tests/allregs.c -=================================================================== ---- elfutils-0.164.orig/tests/allregs.c -+++ elfutils-0.164/tests/allregs.c -@@ -21,7 +21,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/backtrace-data.c -=================================================================== ---- elfutils-0.164.orig/tests/backtrace-data.c -+++ elfutils-0.164/tests/backtrace-data.c -@@ -27,7 +27,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #if defined(__x86_64__) && defined(__linux__) -Index: elfutils-0.164/tests/backtrace-dwarf.c -=================================================================== ---- elfutils-0.164.orig/tests/backtrace-dwarf.c -+++ elfutils-0.164/tests/backtrace-dwarf.c -@@ -22,7 +22,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/backtrace.c -=================================================================== ---- elfutils-0.164.orig/tests/backtrace.c -+++ elfutils-0.164/tests/backtrace.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #ifdef __linux__ -Index: elfutils-0.164/tests/buildid.c -=================================================================== ---- elfutils-0.164.orig/tests/buildid.c -+++ elfutils-0.164/tests/buildid.c -@@ -23,7 +23,7 @@ - #include ELFUTILS_HEADER(elf) - #include ELFUTILS_HEADER(dwelf) - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/debugaltlink.c -=================================================================== ---- elfutils-0.164.orig/tests/debugaltlink.c -+++ elfutils-0.164/tests/debugaltlink.c -@@ -23,7 +23,7 @@ - #include ELFUTILS_HEADER(dw) - #include ELFUTILS_HEADER(dwelf) - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/debuglink.c -=================================================================== ---- elfutils-0.164.orig/tests/debuglink.c -+++ elfutils-0.164/tests/debuglink.c -@@ -21,7 +21,7 @@ - #include - #include ELFUTILS_HEADER(dwelf) - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/deleted.c -=================================================================== ---- elfutils-0.164.orig/tests/deleted.c -+++ elfutils-0.164/tests/deleted.c -@@ -21,7 +21,7 @@ - #include - #include - #include --#include -+#include - #include - #ifdef __linux__ - #include -Index: elfutils-0.164/tests/dwfl-addr-sect.c -=================================================================== ---- elfutils-0.164.orig/tests/dwfl-addr-sect.c -+++ elfutils-0.164/tests/dwfl-addr-sect.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include ELFUTILS_HEADER(dwfl) -Index: elfutils-0.164/tests/dwfl-bug-addr-overflow.c -=================================================================== ---- elfutils-0.164.orig/tests/dwfl-bug-addr-overflow.c -+++ elfutils-0.164/tests/dwfl-bug-addr-overflow.c -@@ -20,7 +20,7 @@ - #include - #include - #include --#include -+#include - #include - #include ELFUTILS_HEADER(dwfl) - -Index: elfutils-0.164/tests/dwfl-bug-fd-leak.c -=================================================================== ---- elfutils-0.164.orig/tests/dwfl-bug-fd-leak.c -+++ elfutils-0.164/tests/dwfl-bug-fd-leak.c -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/dwfl-bug-getmodules.c -=================================================================== ---- elfutils-0.164.orig/tests/dwfl-bug-getmodules.c -+++ elfutils-0.164/tests/dwfl-bug-getmodules.c -@@ -18,7 +18,7 @@ - #include - #include ELFUTILS_HEADER(dwfl) - --#include -+#include - - static const Dwfl_Callbacks callbacks = - { -Index: elfutils-0.164/tests/dwfl-report-elf-align.c -=================================================================== ---- elfutils-0.164.orig/tests/dwfl-report-elf-align.c -+++ elfutils-0.164/tests/dwfl-report-elf-align.c -@@ -20,7 +20,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/dwfllines.c -=================================================================== ---- elfutils-0.164.orig/tests/dwfllines.c -+++ elfutils-0.164/tests/dwfllines.c -@@ -27,7 +27,7 @@ - #include - #include - #include --#include -+#include - - int - main (int argc, char *argv[]) -Index: elfutils-0.164/tests/dwflmodtest.c -=================================================================== ---- elfutils-0.164.orig/tests/dwflmodtest.c -+++ elfutils-0.164/tests/dwflmodtest.c -@@ -23,7 +23,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include ELFUTILS_HEADER(dwfl) -Index: elfutils-0.164/tests/dwflsyms.c -=================================================================== ---- elfutils-0.164.orig/tests/dwflsyms.c -+++ elfutils-0.164/tests/dwflsyms.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - - static const char * -Index: elfutils-0.164/tests/early-offscn.c -=================================================================== ---- elfutils-0.164.orig/tests/early-offscn.c -+++ elfutils-0.164/tests/early-offscn.c -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/ecp.c -=================================================================== ---- elfutils-0.164.orig/tests/ecp.c -+++ elfutils-0.164/tests/ecp.c -@@ -20,7 +20,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/find-prologues.c -=================================================================== ---- elfutils-0.164.orig/tests/find-prologues.c -+++ elfutils-0.164/tests/find-prologues.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -Index: elfutils-0.164/tests/funcretval.c -=================================================================== ---- elfutils-0.164.orig/tests/funcretval.c -+++ elfutils-0.164/tests/funcretval.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -Index: elfutils-0.164/tests/funcscopes.c -=================================================================== ---- elfutils-0.164.orig/tests/funcscopes.c -+++ elfutils-0.164/tests/funcscopes.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -Index: elfutils-0.164/tests/getsrc_die.c -=================================================================== ---- elfutils-0.164.orig/tests/getsrc_die.c -+++ elfutils-0.164/tests/getsrc_die.c -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/line2addr.c -=================================================================== ---- elfutils-0.164.orig/tests/line2addr.c -+++ elfutils-0.164/tests/line2addr.c -@@ -26,7 +26,7 @@ - #include - #include - #include --#include -+#include - - - static void -Index: elfutils-0.164/tests/low_high_pc.c -=================================================================== ---- elfutils-0.164.orig/tests/low_high_pc.c -+++ elfutils-0.164/tests/low_high_pc.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -Index: elfutils-0.164/tests/md5-sha1-test.c -=================================================================== ---- elfutils-0.164.orig/tests/md5-sha1-test.c -+++ elfutils-0.164/tests/md5-sha1-test.c -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - - #include "md5.h" - #include "sha1.h" -Index: elfutils-0.164/tests/rdwrmmap.c -=================================================================== ---- elfutils-0.164.orig/tests/rdwrmmap.c -+++ elfutils-0.164/tests/rdwrmmap.c -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/saridx.c -=================================================================== ---- elfutils-0.164.orig/tests/saridx.c -+++ elfutils-0.164/tests/saridx.c -@@ -17,7 +17,7 @@ - - #include - --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/sectiondump.c -=================================================================== ---- elfutils-0.164.orig/tests/sectiondump.c -+++ elfutils-0.164/tests/sectiondump.c -@@ -18,7 +18,7 @@ - #include - - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/varlocs.c -=================================================================== ---- elfutils-0.164.orig/tests/varlocs.c -+++ elfutils-0.164/tests/varlocs.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/tests/vdsosyms.c -=================================================================== ---- elfutils-0.164.orig/tests/vdsosyms.c -+++ elfutils-0.164/tests/vdsosyms.c -@@ -18,7 +18,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -Index: elfutils-0.164/libelf/elf_getarsym.c -=================================================================== ---- elfutils-0.164.orig/libelf/elf_getarsym.c -+++ elfutils-0.164/libelf/elf_getarsym.c -@@ -302,7 +302,7 @@ elf_getarsym (Elf *elf, size_t *ptr) - arsym[cnt].as_off = (*u32)[cnt]; - - arsym[cnt].as_hash = _dl_elf_hash (str_data); -- str_data = rawmemchr (str_data, '\0') + 1; -+ str_data = memchr (str_data, '\0', SIZE_MAX) + 1; - } - - /* At the end a special entry. */ diff --git a/meta/recipes-devtools/elfutils/elfutils-0.164/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch deleted file mode 100644 index 3754c1c361..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.164/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.164/0001-fix-a-stack-usage-warning.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-fix-a-stack-usage-warning.patch deleted file mode 100644 index 6923bf7053..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.164/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.164/0001-remove-the-unneed-checking.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-remove-the-unneed-checking.patch deleted file mode 100644 index 5be92d705a..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.164/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.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch deleted file mode 100644 index 72125c9ff0..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch +++ /dev/null @@ -1,168 +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 ---- - 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.164/0003-Add-mips-n64-relocation-format-hack.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch deleted file mode 100644 index 14b7985ce8..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch +++ /dev/null @@ -1,226 +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 ---- - 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: elfutils-0.164/libelf/gelf_getrel.c -=================================================================== ---- elfutils-0.164.orig/libelf/gelf_getrel.c -+++ elfutils-0.164/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: elfutils-0.164/libelf/gelf_getrela.c -=================================================================== ---- elfutils-0.164.orig/libelf/gelf_getrela.c -+++ elfutils-0.164/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: elfutils-0.164/libelf/gelf_update_rel.c -=================================================================== ---- elfutils-0.164.orig/libelf/gelf_update_rel.c -+++ elfutils-0.164/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: elfutils-0.164/libelf/gelf_update_rela.c -=================================================================== ---- elfutils-0.164.orig/libelf/gelf_update_rela.c -+++ elfutils-0.164/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: elfutils-0.164/src/strip.c -=================================================================== ---- elfutils-0.164.orig/src/strip.c -+++ elfutils-0.164/src/strip.c -@@ -546,6 +546,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.164/aarch64_uio.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch deleted file mode 100644 index 38dc57befc..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.164/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.164/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.164/arm_backend.diff deleted file mode 100644 index 9d47f95f26..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.164/arm_backend.diff +++ /dev/null @@ -1,600 +0,0 @@ -Index: elfutils-0.164/backends/arm_init.c -=================================================================== ---- elfutils-0.164.orig/backends/arm_init.c -+++ elfutils-0.164/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