summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools/elfutils
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-12-17 04:11:34 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-01-09 02:21:44 +0300
commit1a4b7ee28bf7413af6513fb45ad0d0736048f866 (patch)
tree79f6d8ea698cab8f2eaf4f54b793d2ca7a1451ce /poky/meta/recipes-devtools/elfutils
parent5b9ede0403237c7dace972affa65cf64a1aadd0e (diff)
downloadopenbmc-1a4b7ee28bf7413af6513fb45ad0d0736048f866.tar.xz
reset upstream subtrees to yocto 2.6
Reset the following subtrees on thud HEAD: poky: 87e3a9739d meta-openembedded: 6094ae18c8 meta-security: 31dc4e7532 meta-raspberrypi: a48743dc36 meta-xilinx: c42016e2e6 Also re-apply backports that didn't make it into thud: poky: 17726d0 systemd-systemctl-native: handle Install wildcards meta-openembedded: 4321a5d libtinyxml2: update to 7.0.1 042f0a3 libcereal: Add native and nativesdk classes e23284f libcereal: Allow empty package 030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG 179a1b9 gtest: update to 1.8.1 Squashed OpenBMC subtree compatibility updates: meta-aspeed: Brad Bishop (1): aspeed: add yocto 2.6 compatibility meta-ibm: Brad Bishop (1): ibm: prepare for yocto 2.6 meta-ingrasys: Brad Bishop (1): ingrasys: set layer compatibility to yocto 2.6 meta-openpower: Brad Bishop (1): openpower: set layer compatibility to yocto 2.6 meta-phosphor: Brad Bishop (3): phosphor: set layer compatibility to thud phosphor: libgpg-error: drop patches phosphor: react to fitimage artifact rename Ed Tanous (4): Dropbear: upgrade options for latest upgrade yocto2.6: update openssl options busybox: remove upstream watchdog patch systemd: Rebase CONFIG_CGROUP_BPF patch Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/elfutils')
-rw-r--r--poky/meta/recipes-devtools/elfutils/elfutils_0.174.bb (renamed from poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb)25
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch34
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch791
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-arlib-Check-that-sh_entsize-isn-t-zero.patch36
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch8
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch13
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-libdwfl-Sanity-check-partial-core-file-data-reads.patch60
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch46
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-size-Handle-recursive-ELF-ar-files.patch40
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch4
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch6
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch4
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch8
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch4
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch12
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch873
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch7
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/debian/0001-arm_backend.patch (renamed from poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff)322
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/debian/0001-disable_werror.patch35
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/debian/0001-fix-gcc7-ftbfs.patch57
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/debian/0001-hppa_backend.patch (renamed from poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff)170
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/debian/0001-mips_backend.patch (renamed from poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.patch)31
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/debian/0001-mips_readelf_w.patch39
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/debian/0001-testsuite-ignore-elflint.patch57
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch6
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch8
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff14
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch25
28 files changed, 768 insertions, 1967 deletions
diff --git a/poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb b/poky/meta/recipes-devtools/elfutils/elfutils_0.174.bb
index 14ac22ee6..c30265b53 100644
--- a/poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb
+++ b/poky/meta/recipes-devtools/elfutils/elfutils_0.174.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
DEPENDS = "libtool bzip2 zlib virtual/libintl"
DEPENDS_append_libc-musl = " argp-standalone fts "
# The Debian patches below are from:
-# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.168-0.2.debian.tar.xz
+# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz
SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
file://0001-dso-link-change.patch \
file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
@@ -16,19 +16,26 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
file://0006-Fix-build-on-aarch64-musl.patch \
file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \
file://0001-libasm-may-link-with-libbz2-if-found.patch \
- file://debian/hppa_backend.diff \
- file://debian/arm_backend.diff \
- file://debian/mips_backend.patch \
- file://debian/mips_readelf_w.patch \
+ file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \
+ file://0001-libdwfl-Sanity-check-partial-core-file-data-reads.patch \
+ file://0001-size-Handle-recursive-ELF-ar-files.patch \
+ file://0001-arlib-Check-that-sh_entsize-isn-t-zero.patch \
+ file://debian/0001-hppa_backend.patch \
+ file://debian/0001-arm_backend.patch \
+ file://debian/0001-mips_backend.patch \
+ file://debian/0001-testsuite-ignore-elflint.patch \
+ file://debian/0001-mips_readelf_w.patch \
file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \
file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
file://debian/0003-Add-mips-n64-relocation-format-hack.patch \
- file://0001-Use-fallthrough-attribute.patch \
- file://0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch \
+ file://debian/ignore_strmerge.diff \
+ file://debian/0001-fix-gcc7-ftbfs.patch \
+ file://debian/0001-disable_werror.patch \
"
SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch"
-SRC_URI[md5sum] = "03599aee98c9b726c7a732a2dd0245d5"
-SRC_URI[sha256sum] = "1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066"
+
+SRC_URI[md5sum] = "48bec24c0c8b2c16820326956dff9378"
+SRC_URI[sha256sum] = "cdf27e70076e10a29539d89e367101d516bc4aa11b0d7777fe52139e3fcad08a"
inherit autotools gettext
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch b/poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
deleted file mode 100644
index cf4d1dfe7..000000000
--- a/poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 732913a8c35c7b25c0cbf6903cab1ad6b602b525 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 22 Mar 2018 22:44:03 -0700
-Subject: [PATCH] Ensure that packed structs follow the gcc memory layout
-
-Partial backport of
-https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d
-
-Helps fixing alignment errors e.g.
-linux-core-note.c:116:1: error: alignment 2 of 'struct m68k_prstatus
-' is less than 4 [-Werror=packed-not-aligned]
- ;
- ^
-
-Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- backends/linux-core-note.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
-index 5f06c896..9faae4c3 100644
---- a/backends/linux-core-note.c
-+++ b/backends/linux-core-note.c
-@@ -111,7 +111,7 @@ struct EBLHOOK(prstatus)
- FIELD (INT, pr_fpvalid);
- }
- #ifdef ALIGN_PRSTATUS
-- __attribute__ ((packed, aligned (ALIGN_PRSTATUS)))
-+ attribute_packed __attribute__ ((aligned (ALIGN_PRSTATUS)))
- #endif
- ;
-
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch b/poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch
deleted file mode 100644
index 5e2155b3c..000000000
--- a/poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch
+++ /dev/null
@@ -1,791 +0,0 @@
-From 5cb883f67d00a63531ef195c242763d36b1905ca Mon Sep 17 00:00:00 2001
-From: Joshua Watt <Joshua.Watt@garmin.com>
-Date: Fri, 9 Feb 2018 12:46:38 -0600
-Subject: [PATCH] Use fallthrough attribute
-
-Use __attribute__ ((fallthrough)) to indicate switch case fall through
-instead of a comment. This ensure that the fallthrough warning is not
-triggered even if the file is pre-processed (hence stripping the
-comments) before it is compiled.
-
-The actual fallback implementation is hidden behind a FALLBACK macro in
-case the compiler doesn't support it.
-
-Finally, the -Wimplict-fallthrough warning was upgraded to only allow
-the attribute to satisfy it; a comment alone is no longer sufficient.
-
-Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
-
-Upstream-Status: Submitted [1]
-
-[1] https://sourceware.org/ml/elfutils-devel/2018-q1/msg00027.html
----
- backends/aarch64_retval.c | 2 +-
- backends/alpha_retval.c | 4 ++--
- backends/arm_regs.c | 2 +-
- backends/arm_retval.c | 2 +-
- backends/i386_regs.c | 2 +-
- backends/i386_retval.c | 4 ++--
- backends/ia64_retval.c | 2 +-
- backends/linux-core-note.c | 2 +-
- backends/m68k_retval.c | 4 ++--
- backends/mips_retval.c | 4 ++--
- backends/parisc_retval.c | 5 +++--
- backends/ppc64_retval.c | 6 +++---
- backends/ppc_regs.c | 2 +-
- backends/ppc_retval.c | 4 ++--
- backends/s390_retval.c | 4 ++--
- backends/sh_retval.c | 2 +-
- backends/sparc_retval.c | 2 +-
- backends/tilegx_retval.c | 4 ++--
- backends/x86_64_regs.c | 2 +-
- backends/x86_64_retval.c | 2 +-
- config/eu.am | 4 +++-
- configure.ac | 6 ++++++
- lib/eu-config.h | 7 +++++++
- libcpu/i386_disasm.c | 2 +-
- libcpu/i386_parse.c | 4 ++--
- libdw/cfi.c | 4 ++--
- libdw/dwarf_frame_register.c | 2 +-
- libdwfl/dwfl_report_elf.c | 2 +-
- libdwfl/frame_unwind.c | 2 +-
- libebl/eblobjnote.c | 2 +-
- libelf/elf32_updatenull.c | 2 +-
- libelf/elf_begin.c | 4 ++--
- libelf/elf_cntl.c | 2 +-
- src/addr2line.c | 2 +-
- src/elfcompress.c | 2 +-
- src/elflint.c | 8 ++++----
- src/objdump.c | 2 +-
- src/readelf.c | 8 ++++----
- src/strings.c | 2 +-
- tests/backtrace.c | 2 +-
- tests/elfstrmerge.c | 3 ++-
- 41 files changed, 75 insertions(+), 58 deletions(-)
-
-diff --git a/backends/aarch64_retval.c b/backends/aarch64_retval.c
-index 68de307..1308340 100644
---- a/backends/aarch64_retval.c
-+++ b/backends/aarch64_retval.c
-@@ -292,7 +292,7 @@ aarch64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- assert (count > 0);
- if (count <= 4)
- return pass_hfa (locp, base_size, count);
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case 1:
- /* Not a HFA. */
-diff --git a/backends/alpha_retval.c b/backends/alpha_retval.c
-index 53dbfa4..d9bae3b 100644
---- a/backends/alpha_retval.c
-+++ b/backends/alpha_retval.c
-@@ -85,7 +85,7 @@ alpha_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-@@ -131,7 +131,7 @@ alpha_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- }
- }
-
-- /* Else fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_structure_type:
- case DW_TAG_class_type:
-diff --git a/backends/arm_regs.c b/backends/arm_regs.c
-index 4ee1039..418c931 100644
---- a/backends/arm_regs.c
-+++ b/backends/arm_regs.c
-@@ -81,7 +81,7 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
- * but gcc maps FPA registers here
- */
- regno += 96 - 16;
-- /* Fall through. */
-+ FALLTHROUGH;
- case 96 + 0 ... 96 + 7:
- *setname = "FPA";
- *type = DW_ATE_float;
-diff --git a/backends/arm_retval.c b/backends/arm_retval.c
-index 8687eab..313e4eb 100644
---- a/backends/arm_retval.c
-+++ b/backends/arm_retval.c
-@@ -90,7 +90,7 @@ arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp,
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-diff --git a/backends/i386_regs.c b/backends/i386_regs.c
-index fd963a6..7ec93bb 100644
---- a/backends/i386_regs.c
-+++ b/backends/i386_regs.c
-@@ -92,7 +92,7 @@ i386_register_info (Ebl *ebl __attribute__ ((unused)),
- case 5:
- case 8:
- *type = DW_ATE_address;
-- /* Fallthrough */
-+ FALLTHROUGH;
- case 0 ... 3:
- case 6 ... 7:
- name[0] = 'e';
-diff --git a/backends/i386_retval.c b/backends/i386_retval.c
-index 4aa646f..32fec72 100644
---- a/backends/i386_retval.c
-+++ b/backends/i386_retval.c
-@@ -85,7 +85,7 @@ i386_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-@@ -123,7 +123,7 @@ i386_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- if (size <= 8)
- return nloc_intregpair;
- }
-- /* Fallthrough */
-+ FALLTHROUGH;
-
- case DW_TAG_structure_type:
- case DW_TAG_class_type:
-diff --git a/backends/ia64_retval.c b/backends/ia64_retval.c
-index dcd5f28..03ea4d8 100644
---- a/backends/ia64_retval.c
-+++ b/backends/ia64_retval.c
-@@ -260,7 +260,7 @@ ia64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
-index 67638d7..5f06c89 100644
---- a/backends/linux-core-note.c
-+++ b/backends/linux-core-note.c
-@@ -226,7 +226,7 @@ EBLHOOK(core_note) (const GElf_Nhdr *nhdr, const char *name,
- if (memcmp (name, "CORE", nhdr->n_namesz) == 0)
- break;
- /* Buggy old Linux kernels didn't terminate "LINUX". */
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case sizeof "LINUX":
- if (memcmp (name, "LINUX", nhdr->n_namesz) == 0)
-diff --git a/backends/m68k_retval.c b/backends/m68k_retval.c
-index c68ed02..a653ba3 100644
---- a/backends/m68k_retval.c
-+++ b/backends/m68k_retval.c
-@@ -92,7 +92,7 @@ m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-@@ -135,7 +135,7 @@ m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- if (size <= 8)
- return nloc_intregpair;
- }
-- /* Fallthrough */
-+ FALLTHROUGH;
- case DW_TAG_structure_type:
- case DW_TAG_class_type:
- case DW_TAG_union_type:
-diff --git a/backends/mips_retval.c b/backends/mips_retval.c
-index 57487bb..c6e1ffe 100644
---- a/backends/mips_retval.c
-+++ b/backends/mips_retval.c
-@@ -306,7 +306,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = dwarf_tag (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-@@ -389,7 +389,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- }
- }
-
-- /* Fallthrough to handle large types */
-+ FALLTHROUGH; /* Fallthrough to handle large types */
-
- case DW_TAG_array_type:
- large:
-diff --git a/backends/parisc_retval.c b/backends/parisc_retval.c
-index df7ec3a..1f1e91a 100644
---- a/backends/parisc_retval.c
-+++ b/backends/parisc_retval.c
-@@ -116,7 +116,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = dwarf_tag (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-@@ -167,6 +167,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
-
- /* Else fall through. */
- }
-+ FALLTHROUGH;
-
- case DW_TAG_structure_type:
- case DW_TAG_class_type:
-@@ -189,7 +190,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
- *locp = loc_aggregate;
- return nloc_aggregate;
- #endif
-- /* fall through. */
-+ FALLTHROUGH;
- }
- }
-
-diff --git a/backends/ppc64_retval.c b/backends/ppc64_retval.c
-index a251983..eb1c11e 100644
---- a/backends/ppc64_retval.c
-+++ b/backends/ppc64_retval.c
-@@ -96,7 +96,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-@@ -141,7 +141,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- return nloc_intreg;
- }
-
-- /* Else fall through. */
-+ FALLTHROUGH;
- case DW_TAG_structure_type:
- case DW_TAG_class_type:
- case DW_TAG_union_type:
-@@ -161,7 +161,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- return nloc_vmxreg;
- }
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_string_type:
- if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 8)
-diff --git a/backends/ppc_regs.c b/backends/ppc_regs.c
-index c2d5011..43d2534 100644
---- a/backends/ppc_regs.c
-+++ b/backends/ppc_regs.c
-@@ -140,7 +140,7 @@ ppc_register_info (Ebl *ebl __attribute__ ((unused)),
- case 100:
- if (*bits == 32)
- return stpcpy (name, "mq") + 1 - name;
-- /* Fallthrough */
-+ FALLTHROUGH;
- case 102 ... 107:
- name[0] = 's';
- name[1] = 'p';
-diff --git a/backends/ppc_retval.c b/backends/ppc_retval.c
-index b14a99f..39b42da 100644
---- a/backends/ppc_retval.c
-+++ b/backends/ppc_retval.c
-@@ -108,7 +108,7 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-@@ -172,7 +172,7 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- return nloc_intregquad;
- }
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_structure_type:
- case DW_TAG_class_type:
-diff --git a/backends/s390_retval.c b/backends/s390_retval.c
-index a927d46..2043f98 100644
---- a/backends/s390_retval.c
-+++ b/backends/s390_retval.c
-@@ -87,7 +87,7 @@ s390_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-@@ -127,7 +127,7 @@ s390_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- return size <= asize ? nloc_intreg : nloc_intregpair;
- }
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_structure_type:
- case DW_TAG_class_type:
-diff --git a/backends/sh_retval.c b/backends/sh_retval.c
-index d44f260..33d7d96 100644
---- a/backends/sh_retval.c
-+++ b/backends/sh_retval.c
-@@ -84,7 +84,7 @@ sh_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-diff --git a/backends/sparc_retval.c b/backends/sparc_retval.c
-index e1b1775..fb81cdc 100644
---- a/backends/sparc_retval.c
-+++ b/backends/sparc_retval.c
-@@ -91,7 +91,7 @@ sparc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-diff --git a/backends/tilegx_retval.c b/backends/tilegx_retval.c
-index db81a20..7f7d24b 100644
---- a/backends/tilegx_retval.c
-+++ b/backends/tilegx_retval.c
-@@ -79,7 +79,7 @@ tilegx_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-@@ -113,7 +113,7 @@ tilegx_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- return nloc_intreg;
- }
-
-- /* Else fall through. */
-+ FALLTHROUGH;
- case DW_TAG_structure_type:
- case DW_TAG_class_type:
- case DW_TAG_union_type:
-diff --git a/backends/x86_64_regs.c b/backends/x86_64_regs.c
-index 8430440..ef987da 100644
---- a/backends/x86_64_regs.c
-+++ b/backends/x86_64_regs.c
-@@ -87,7 +87,7 @@ x86_64_register_info (Ebl *ebl __attribute__ ((unused)),
-
- case 6 ... 7:
- *type = DW_ATE_address;
-- /* Fallthrough */
-+ FALLTHROUGH;
- case 0 ... 5:
- name[0] = 'r';
- name[1] = baseregs[regno][0];
-diff --git a/backends/x86_64_retval.c b/backends/x86_64_retval.c
-index b3799ae..f9114cb 100644
---- a/backends/x86_64_retval.c
-+++ b/backends/x86_64_retval.c
-@@ -100,7 +100,7 @@ x86_64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
-diff --git a/config/eu.am b/config/eu.am
-index 8fe1e25..b6ec581 100644
---- a/config/eu.am
-+++ b/config/eu.am
-@@ -62,7 +62,9 @@ NULL_DEREFERENCE_WARNING=
- endif
-
- if HAVE_IMPLICIT_FALLTHROUGH_WARNING
--IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough
-+# Use strict fallthrough. Only __attribute__((fallthrough)) will prevent the
-+# warning
-+IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough=5
- else
- IMPLICIT_FALLTHROUGH_WARNING=
- endif
-diff --git a/configure.ac b/configure.ac
-index 1f1856d..698efbb 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -360,6 +360,12 @@ CFLAGS="$old_CFLAGS"])
- AM_CONDITIONAL(HAVE_IMPLICIT_FALLTHROUGH_WARNING,
- [test "x$ac_cv_implicit_fallthrough" != "xno"])
-
-+# Assume the fallthrough attribute is supported if -Wimplict-fallthrough is supported
-+if test "$ac_cv_implicit_fallthrough" = "yes"; then
-+ AC_DEFINE([HAVE_FALLTHROUGH], [1],
-+ [Defined if __attribute__((fallthrough)) is supported])
-+fi
-+
- dnl Check if we have argp available from our libc
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
-diff --git a/lib/eu-config.h b/lib/eu-config.h
-index 400cdc6..e8d4ec2 100644
---- a/lib/eu-config.h
-+++ b/lib/eu-config.h
-@@ -186,5 +186,12 @@ asm (".section predict_data, \"aw\"; .previous\n"
- # define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING"
- #endif
-
-+#ifndef FALLTHROUGH
-+# ifdef HAVE_FALLTHROUGH
-+# define FALLTHROUGH __attribute__ ((fallthrough))
-+# else
-+# define FALLTHROUGH ((void) 0)
-+# endif
-+#endif
-
- #endif /* eu-config.h */
-diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
-index 60fd6d4..837a3a8 100644
---- a/libcpu/i386_disasm.c
-+++ b/libcpu/i386_disasm.c
-@@ -819,7 +819,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)),
- ++param_start;
- break;
- }
-- /* Fallthrough */
-+ FALLTHROUGH;
- default:
- str = "";
- assert (! "INVALID not handled");
-diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c
-index ef1ac35..6fa7ce3 100644
---- a/libcpu/i386_parse.c
-+++ b/libcpu/i386_parse.c
-@@ -1047,7 +1047,7 @@ yytnamerr (char *yyres, const char *yystr)
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
-- /* Fall through. */
-+ FALLTHROUGH;
- default:
- if (yyres)
- yyres[yyn] = *yyp;
-@@ -2042,7 +2042,7 @@ yyabortlab:
- yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
- yyresult = 2;
-- /* Fall through. */
-+ FALLTHROUGH;
- #endif
-
- yyreturn:
-diff --git a/libdw/cfi.c b/libdw/cfi.c
-index daa845f..341e055 100644
---- a/libdw/cfi.c
-+++ b/libdw/cfi.c
-@@ -138,7 +138,7 @@ execute_cfi (Dwarf_CFI *cache,
-
- case DW_CFA_advance_loc1:
- operand = *program++;
-- /* Fallthrough */
-+ FALLTHROUGH;
- case DW_CFA_advance_loc + 0 ... DW_CFA_advance_loc + CFI_PRIMARY_MAX:
- advance_loc:
- loc += operand * cie->code_alignment_factor;
-@@ -301,7 +301,7 @@ execute_cfi (Dwarf_CFI *cache,
-
- case DW_CFA_restore_extended:
- get_uleb128 (operand, program, end);
-- /* Fallthrough */
-+ FALLTHROUGH;
- case DW_CFA_restore + 0 ... DW_CFA_restore + CFI_PRIMARY_MAX:
-
- if (unlikely (abi_cfi) && likely (opcode == DW_CFA_restore))
-diff --git a/libdw/dwarf_frame_register.c b/libdw/dwarf_frame_register.c
-index 37e8e91..d0159fb 100644
---- a/libdw/dwarf_frame_register.c
-+++ b/libdw/dwarf_frame_register.c
-@@ -62,7 +62,7 @@ dwarf_frame_register (Dwarf_Frame *fs, int regno, Dwarf_Op *ops_mem,
- /* Use the default rule for registers not yet mentioned in CFI. */
- if (fs->cache->default_same_value)
- goto same_value;
-- /*FALLTHROUGH*/
-+ FALLTHROUGH;
- case reg_undefined:
- /* The value is known to be unavailable. */
- break;
-diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c
-index 6950a37..3fc9384 100644
---- a/libdwfl/dwfl_report_elf.c
-+++ b/libdwfl/dwfl_report_elf.c
-@@ -174,7 +174,7 @@ __libdwfl_elf_address_range (Elf *elf, GElf_Addr base, bool add_p_vaddr,
- /* An assigned base address is meaningless for these. */
- base = 0;
- add_p_vaddr = true;
-- /* Fallthrough. */
-+ FALLTHROUGH;
- case ET_DYN:
- default:;
- size_t phnum;
-diff --git a/libdwfl/frame_unwind.c b/libdwfl/frame_unwind.c
-index 4dc9c43..eaea495 100644
---- a/libdwfl/frame_unwind.c
-+++ b/libdwfl/frame_unwind.c
-@@ -442,7 +442,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops,
- }
- if (val1 == 0)
- break;
-- /* FALLTHRU */
-+ FALLTHROUGH;
- case DW_OP_skip:;
- Dwarf_Word offset = op->offset + 1 + 2 + (int16_t) op->number;
- const Dwarf_Op *found = bsearch ((void *) (uintptr_t) offset, ops, nops,
-diff --git a/libebl/eblobjnote.c b/libebl/eblobjnote.c
-index f80a1a5..ca4f155 100644
---- a/libebl/eblobjnote.c
-+++ b/libebl/eblobjnote.c
-@@ -223,7 +223,7 @@ ebl_object_note (Ebl *ebl, const char *name, uint32_t type,
- free (buf);
- break;
- }
-- /* FALLTHROUGH */
-+ FALLTHROUGH;
-
- default:
- /* Unknown type. */
-diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c
-index a51bf70..5351518 100644
---- a/libelf/elf32_updatenull.c
-+++ b/libelf/elf32_updatenull.c
-@@ -232,7 +232,7 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum)
- __libelf_seterrno (ELF_E_GROUP_NOT_REL);
- return -1;
- }
-- /* FALLTHROUGH */
-+ FALLTHROUGH;
- case SHT_SYMTAB_SHNDX:
- sh_entsize = elf_typesize (32, ELF_T_WORD, 1);
- break;
-diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
-index 6f85038..6de206a 100644
---- a/libelf/elf_begin.c
-+++ b/libelf/elf_begin.c
-@@ -582,7 +582,7 @@ read_unmmaped_file (int fildes, off_t offset, size_t maxsize, Elf_Cmd cmd,
- ? sizeof (Elf32_Ehdr) : sizeof (Elf64_Ehdr)))
- return file_read_elf (fildes, NULL, mem.header, offset, maxsize, cmd,
- parent);
-- /* FALLTHROUGH */
-+ FALLTHROUGH;
-
- default:
- break;
-@@ -1097,7 +1097,7 @@ elf_begin (int fildes, Elf_Cmd cmd, Elf *ref)
- retval = NULL;
- break;
- }
-- /* FALLTHROUGH */
-+ FALLTHROUGH;
-
- case ELF_C_READ:
- case ELF_C_READ_MMAP:
-diff --git a/libelf/elf_cntl.c b/libelf/elf_cntl.c
-index ab13ffb..fd68178 100644
---- a/libelf/elf_cntl.c
-+++ b/libelf/elf_cntl.c
-@@ -62,7 +62,7 @@ elf_cntl (Elf *elf, Elf_Cmd cmd)
- result = -1;
- break;
- }
-- /* FALLTHROUGH */
-+ FALLTHROUGH;
-
- case ELF_C_FDDONE:
- /* Mark the file descriptor as not usable. */
-diff --git a/src/addr2line.c b/src/addr2line.c
-index ba414a7..444ee52 100644
---- a/src/addr2line.c
-+++ b/src/addr2line.c
-@@ -618,7 +618,7 @@ handle_address (const char *string, Dwfl *dwfl)
- case 1:
- addr = 0;
- j = i;
-- /* Fallthrough */
-+ FALLTHROUGH;
- case 2:
- if (string[j] != '\0')
- break;
-diff --git a/src/elfcompress.c b/src/elfcompress.c
-index 8e0d5c5..25378a4 100644
---- a/src/elfcompress.c
-+++ b/src/elfcompress.c
-@@ -149,7 +149,7 @@ parse_opt (int key, char *arg __attribute__ ((unused)),
- N_("Only one input file allowed together with '-o'"));
- /* We only use this for checking the number of arguments, we don't
- actually want to consume them. */
-- /* Fallthrough */
-+ FALLTHROUGH;
- default:
- return ARGP_ERR_UNKNOWN;
- }
-diff --git a/src/elflint.c b/src/elflint.c
-index 51e53c2..df1b3a0 100644
---- a/src/elflint.c
-+++ b/src/elflint.c
-@@ -1764,7 +1764,7 @@ section [%2d] '%s': entry %zu: pointer does not match address of section [%2d] '
- if (dyn->d_tag < DT_ADDRRNGLO || dyn->d_tag > DT_ADDRRNGHI)
- /* Value is no pointer. */
- break;
-- /* FALLTHROUGH */
-+ FALLTHROUGH;
-
- case DT_AUXILIARY:
- case DT_FILTER:
-@@ -3993,7 +3993,7 @@ section [%2zu] '%s': merge flag set but entry size is zero\n"),
- case SHT_NOBITS:
- if (is_debuginfo)
- break;
-- /* Fallthrough */
-+ FALLTHROUGH;
- default:
- ERROR (gettext ("\
- section [%2zu] '%s' has unexpected type %d for an executable section\n"),
-@@ -4137,7 +4137,7 @@ section [%2zu] '%s': ELF header says this is the section header string table but
- ERROR (gettext ("\
- section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n"),
- cnt, section_name (ebl, cnt));
-- /* FALLTHROUGH */
-+ FALLTHROUGH;
- case SHT_SYMTAB:
- check_symtab (ebl, ehdr, shdr, cnt);
- break;
-@@ -4336,7 +4336,7 @@ section [%2d] '%s': unknown core file note type %" PRIu32
- if (nhdr.n_namesz == sizeof "Linux"
- && !memcmp (data->d_buf + name_offset, "Linux", sizeof "Linux"))
- break;
-- /* Fallthrough */
-+ FALLTHROUGH;
- default:
- if (shndx == 0)
- ERROR (gettext ("\
-diff --git a/src/objdump.c b/src/objdump.c
-index 860cfac..0dd9a6a 100644
---- a/src/objdump.c
-+++ b/src/objdump.c
-@@ -223,7 +223,7 @@ parse_opt (int key, char *arg,
- }
- /* We only use this for checking the number of arguments, we don't
- actually want to consume them. */
-- /* Fallthrough */
-+ FALLTHROUGH;
- default:
- return ARGP_ERR_UNKNOWN;
- }
-diff --git a/src/readelf.c b/src/readelf.c
-index 346eccd..6a27e7e 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -465,7 +465,7 @@ parse_opt (int key, char *arg,
- print_string_sections = true;
- break;
- }
-- /* Fall through. */
-+ FALLTHROUGH;
- case 'x':
- add_dump_section (arg, false);
- any_control_option = true;
-@@ -6029,7 +6029,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
- dwarf_form_name (form), (uintmax_t) num);
- return DWARF_CB_OK;
- }
-- /* else fallthrough */
-+ FALLTHROUGH;
-
- /* These cases always take a loclistptr and no constant. */
- case DW_AT_location:
-@@ -6195,7 +6195,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
- print_block (block.length, block.data);
- break;
- }
-- /* Fall through. */
-+ FALLTHROUGH;
-
- case DW_AT_location:
- case DW_AT_data_location:
-@@ -9227,7 +9227,7 @@ handle_auxv_note (Ebl *ebl, Elf *core, GElf_Word descsz, GElf_Off desc_pos)
- printf (" %s\n", name);
- break;
- }
-- /* Fall through */
-+ FALLTHROUGH;
- case 'x': /* hex */
- case 'p': /* address */
- case 's': /* address of string */
-diff --git a/src/strings.c b/src/strings.c
-index d214356..03d0f13 100644
---- a/src/strings.c
-+++ b/src/strings.c
-@@ -246,7 +246,7 @@ parse_opt (int key, char *arg,
- case 'b':
- case 'B':
- big_endian = true;
-- /* FALLTHROUGH */
-+ FALLTHROUGH;
-
- case 'l':
- case 'L':
-diff --git a/tests/backtrace.c b/tests/backtrace.c
-index 21abe8a..f5dd761 100644
---- a/tests/backtrace.c
-+++ b/tests/backtrace.c
-@@ -127,7 +127,7 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
- assert (symname2 == NULL || strcmp (symname2, "jmp") != 0);
- break;
- }
-- /* FALLTHRU */
-+ FALLTHROUGH;
- case 4:
- /* Some simple frame unwinders get this wrong and think sigusr2
- is calling itself again. Allow it and just pretend there is
-diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c
-index 8d5b53c..62c549d 100644
---- a/tests/elfstrmerge.c
-+++ b/tests/elfstrmerge.c
-@@ -578,7 +578,8 @@ main (int argc, char **argv)
- break;
-
- case SHT_DYNAMIC:
-- /* Fallthrough. There are string indexes in here, but
-+ FALLTHROUGH;
-+ /* There are string indexes in here, but
- they (should) point to a allocated string table,
- which we don't alter. */
- default:
---
-2.14.3
-
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-arlib-Check-that-sh_entsize-isn-t-zero.patch b/poky/meta/recipes-devtools/elfutils/files/0001-arlib-Check-that-sh_entsize-isn-t-zero.patch
new file mode 100644
index 000000000..86cf7c8d5
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-arlib-Check-that-sh_entsize-isn-t-zero.patch
@@ -0,0 +1,36 @@
+From b518841fbc1431d7c5baa016e35f10fb647b5958 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Thu, 18 Oct 2018 19:01:52 +0200
+Subject: [PATCH] arlib: Check that sh_entsize isn't zero.
+
+A bogus ELF file could have sh_entsize as zero. Don't divide by zero,
+but just assume there are no symbols in the section.
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=23786
+
+Signed-off-by: Mark Wielaard <mark@klomp.org>
+
+CVE: CVE-2018-18521
+Upstream-Status: Backport [http://sourceware.org/git/elfutils.git]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/arlib.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/arlib.c b/src/arlib.c
+index 778e087..a6521e3 100644
+--- a/src/arlib.c
++++ b/src/arlib.c
+@@ -252,6 +252,9 @@ arlib_add_symbols (Elf *elf, const char *arfname, const char *membername,
+ if (data == NULL)
+ continue;
+
++ if (shdr->sh_entsize == 0)
++ continue;
++
+ int nsyms = shdr->sh_size / shdr->sh_entsize;
+ for (int ndx = shdr->sh_info; ndx < nsyms; ++ndx)
+ {
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch b/poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch
index 28c57f236..4c62dc511 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch
@@ -1,4 +1,4 @@
-From 0a69a26c9f7487daca900db87cd1195857a4603f Mon Sep 17 00:00:00 2001
+From c9c6d2414651dbf163dc4963c3c3d6f5cacef898 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 15 Aug 2017 17:10:57 +0800
Subject: [PATCH 1/7] dso link change
@@ -35,10 +35,10 @@ index 2b1c0dc..9305b84 100644
endif
libebl = ../libebl/libebl.a
diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 3735084..528615d 100644
+index b45ecdc..dd256fb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
-@@ -400,7 +400,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl
+@@ -436,7 +436,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl
libelf = ../libelf/libelf.a -lz
libasm = ../libasm/libasm.a
else
@@ -48,5 +48,5 @@ index 3735084..528615d 100644
libasm = ../libasm/libasm.so
endif
--
-1.8.3.1
+2.7.4
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch b/poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch
index fb0b060b4..c342053aa 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch
@@ -1,4 +1,4 @@
-From 7672e363468271b4c63ff58770c5aac15ab8f722 Mon Sep 17 00:00:00 2001
+From 74629016e76343a4bf39915c9192b6bf26a57c2d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 4 Oct 2017 22:30:46 -0700
Subject: [PATCH] libasm may link with libbz2 if found
@@ -9,15 +9,14 @@ where indirect libraries may be not found by linker
| /mnt/a/oe/build/tmp/work/riscv64-bec-linux/elfutils/0.170-r0/recipe-sysroot/usr/lib/libbz2.so.1: error adding symbols: DSO missing from command line
| collect2: error: ld returned 1 exit status
+Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
-Upstream-Status: Pending
-
- src/Makefile.am | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ src/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
-index e03bc32..9b7e853 100644
+index 9305b84..9b7e853 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -39,11 +39,11 @@ EXTRA_DIST += make-debug-archive.in
@@ -35,5 +34,5 @@ index e03bc32..9b7e853 100644
libelf = ../libelf/libelf.so
endif
--
-2.14.2
+2.7.4
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-libdwfl-Sanity-check-partial-core-file-data-reads.patch b/poky/meta/recipes-devtools/elfutils/files/0001-libdwfl-Sanity-check-partial-core-file-data-reads.patch
new file mode 100644
index 000000000..2c74a8d5d
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-libdwfl-Sanity-check-partial-core-file-data-reads.patch
@@ -0,0 +1,60 @@
+From 8cbb2f8de89d65ca52d4242f213a6206b48d2c8d Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 2 Nov 2018 14:22:31 +0800
+Subject: [PATCH] libdwfl: Sanity check partial core file data reads.
+
+There were two issues when reading note data from a core file.
+We didn't check if the data we already had in a buffer was big
+enough. And if we did get the data, we should check if we got
+everything, or just a part of the data.
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=23752
+
+Signed-off-by: Mark Wielaard <mark@klomp.org>
+
+CVE: CVE-2018-18310
+Upstream-Status: Backport [http://sourceware.org/git/elfutils.git]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ libdwfl/dwfl_segment_report_module.c | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/libdwfl/dwfl_segment_report_module.c b/libdwfl/dwfl_segment_report_module.c
+index 36e5c82..8749884 100644
+--- a/libdwfl/dwfl_segment_report_module.c
++++ b/libdwfl/dwfl_segment_report_module.c
+@@ -1,5 +1,5 @@
+ /* Sniff out modules from ELF headers visible in memory segments.
+- Copyright (C) 2008-2012, 2014, 2015 Red Hat, Inc.
++ Copyright (C) 2008-2012, 2014, 2015, 2018 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+@@ -301,7 +301,10 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name,
+ inline bool read_portion (void **data, size_t *data_size,
+ GElf_Addr vaddr, size_t filesz)
+ {
+- if (vaddr - start + filesz > buffer_available
++ /* Check whether we will have to read the segment data, or if it
++ can be returned from the existing buffer. */
++ if (filesz > buffer_available
++ || vaddr - start > buffer_available - filesz
+ /* If we're in string mode, then don't consider the buffer we have
+ sufficient unless it contains the terminator of the string. */
+ || (filesz == 0 && memchr (vaddr - start + buffer, '\0',
+@@ -459,6 +462,12 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name,
+ if (read_portion (&data, &data_size, vaddr, filesz))
+ return;
+
++ /* data_size will be zero if we got everything from the initial
++ buffer, otherwise it will be the size of the new buffer that
++ could be read. */
++ if (data_size != 0)
++ filesz = data_size;
++
+ assert (sizeof (Elf32_Nhdr) == sizeof (Elf64_Nhdr));
+
+ void *notes;
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch b/poky/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch
new file mode 100644
index 000000000..1bdb51169
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch
@@ -0,0 +1,46 @@
+From 3393a2e544818f0bd1887c13f28a76ad60c2df98 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 16 Aug 2018 09:58:26 +0800
+Subject: [PATCH] libelf/elf_end.c: check data_list.data.d.d_buf before free it
+
+The one which actually saves the data is data_list.data.d.d_buf, so check it
+before free rawdata_base.
+
+This can fix a segmentation fault when prelink libqb_1.0.3:
+prelink: /usr/lib/libqb.so.0.18.2: Symbol section index outside of section numbers
+
+The segmentation fault happens when prelink call elf_end().
+
+Upstream-Status: Submitted [https://sourceware.org/ml/elfutils-devel/2018-q3/msg00085.html]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ libelf/elf_end.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libelf/elf_end.c b/libelf/elf_end.c
+index 160f0b8..5280a70 100644
+--- a/libelf/elf_end.c
++++ b/libelf/elf_end.c
+@@ -160,14 +160,16 @@ elf_end (Elf *elf)
+ architecture doesn't require overly stringent
+ alignment the raw data buffer is the same as the
+ one used for presenting to the caller. */
+- if (scn->data_base != scn->rawdata_base)
++ if ((scn->data_base != scn->rawdata_base)
++ && (scn->data_list.data.d.d_buf != NULL))
+ free (scn->data_base);
+
+ /* The section data is allocated if we couldn't mmap
+ the file. Or if we had to decompress. */
+- if (elf->map_address == NULL
++ if ((elf->map_address == NULL
+ || scn->rawdata_base == scn->zdata_base
+ || (scn->flags & ELF_F_MALLOCED) != 0)
++ && (scn->data_list.data.d.d_buf != NULL))
+ free (scn->rawdata_base);
+
+ /* Free the list of data buffers for the section.
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-size-Handle-recursive-ELF-ar-files.patch b/poky/meta/recipes-devtools/elfutils/files/0001-size-Handle-recursive-ELF-ar-files.patch
new file mode 100644
index 000000000..6fed82692
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-size-Handle-recursive-ELF-ar-files.patch
@@ -0,0 +1,40 @@
+From 440d34d0ee37964453245895d38d7fc31bcf3d7d Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Thu, 18 Oct 2018 23:15:48 +0200
+Subject: [PATCH] size: Handle recursive ELF ar files.
+
+eu-size didn't handle an ELF ar file that contained an ar file itself
+correctly. handle_ar would recursively call itself but close the ELF
+file before returning. Only close the ELF file at the top-level.
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=23787
+
+Signed-off-by: Mark Wielaard <mark@klomp.org>
+
+CVE: CVE-2018-18520
+Upstream-Status: Backport [http://sourceware.org/git/elfutils.git]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/size.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/size.c b/src/size.c
+index 5ff3f2a..f01fd88 100644
+--- a/src/size.c
++++ b/src/size.c
+@@ -374,8 +374,10 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname)
+ INTERNAL_ERROR (fname);
+ }
+
+- if (unlikely (elf_end (elf) != 0))
+- INTERNAL_ERROR (fname);
++ /* Only close ELF handle if this was a "top level" ar file. */
++ if (prefix == NULL)
++ if (unlikely (elf_end (elf) != 0))
++ INTERNAL_ERROR (fname);
+
+ return result;
+ }
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch b/poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch
index 2f718eb82..86d26bdf3 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch
@@ -1,4 +1,4 @@
-From e98670f7c7b4c73fb65534949716fd8d043960d5 Mon Sep 17 00:00:00 2001
+From 9fd4bb05d3f2b7eaf9fe441bee26d3b1878d7cc7 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 15 Aug 2017 17:13:59 +0800
Subject: [PATCH 2/7] Fix elf_cvt_gunhash if dest and src are same.
@@ -38,5 +38,5 @@ index 6faf113..04d9ca1 100644
/* Now the 64 bit words. */
Elf64_Xword *dest64 = (Elf64_Xword *) &dest32[4];
--
-1.8.3.1
+2.7.4
diff --git a/poky/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch b/poky/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch
index 7c49fced1..d1c8e4143 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch
@@ -1,4 +1,4 @@
-From 565d5935abf5b58773f9c8385c00189221980d98 Mon Sep 17 00:00:00 2001
+From 04fb3f65ec186df5231dd0c21780a55dcc03c868 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 15 Aug 2017 17:17:20 +0800
Subject: [PATCH 3/7] fixheadercheck
@@ -21,7 +21,7 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c
-index d83c0b3..a51bf70 100644
+index 3e9ef61..5351518 100644
--- a/libelf/elf32_updatenull.c
+++ b/libelf/elf32_updatenull.c
@@ -339,8 +339,8 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum)
@@ -36,5 +36,5 @@ index d83c0b3..a51bf70 100644
__libelf_seterrno (ELF_E_INVALID_ALIGN);
return -1;
--
-1.8.3.1
+2.7.4
diff --git a/poky/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch b/poky/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch
index d893ad68f..bf3a645bc 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch
@@ -1,4 +1,4 @@
-From bb7ed11950101798aae82f7fda8b3dcb05f755c5 Mon Sep 17 00:00:00 2001
+From dbc88349b9eed4268db951df2c3a8387f75a32e7 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 15 Aug 2017 17:24:06 +0800
Subject: [PATCH 4/7] Disable the test to convert euc-jp
@@ -40,5 +40,5 @@ index a503646..299f1eb 100644
}]])],
[am_cv_func_iconv_works=yes],
--
-1.8.3.1
+2.7.4
diff --git a/poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch b/poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch
index 22a01cfa7..e2966cbea 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch
@@ -1,4 +1,4 @@
-From dd6dbf6af396519380f48c0ef1ce6cf4dd77f6d7 Mon Sep 17 00:00:00 2001
+From 4d7ea681932556ad881f6841de90d0bfff56f8d7 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 15 Aug 2017 17:25:16 +0800
Subject: [PATCH 5/7] fix a stack-usage warning
@@ -18,10 +18,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c
-index 69d623b..de41dec 100644
+index 3e4432f..59c2d97 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)),
+@@ -94,7 +94,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);
@@ -31,5 +31,5 @@ index 69d623b..de41dec 100644
dwarf_regs[gpr] = user_regs.r.gpr[gpr];
if (! setfunc (0, gprs, dwarf_regs, arg))
--
-1.8.3.1
+2.7.4
diff --git a/poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch b/poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch
index 5f29a0375..40b8544fa 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch
@@ -1,4 +1,4 @@
-From e57ad47fc8549353ca80c23b9b4f38f31fde13e5 Mon Sep 17 00:00:00 2001
+From b4ec05953f78af26bcd7de45a5bbc5f138d023da Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 15 Aug 2017 17:27:30 +0800
Subject: [PATCH 6/7] Fix build on aarch64/musl
@@ -57,5 +57,5 @@ index efcabaf..062bb9e 100644
# include <sys/ptrace.h>
/* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
--
-1.8.3.1
+2.7.4
diff --git a/poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch b/poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch
index 224770478..bba420e34 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch
@@ -1,6 +1,6 @@
-From 1e91c1d4e37c05cf95058b4b3c3f352d72886f58 Mon Sep 17 00:00:00 2001
+From 8eb100b2e51be5d473b0748a223e2e7f61ec606c Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Tue, 15 Aug 2017 17:31:38 +0800
+Date: Fri, 29 Jun 2018 15:14:28 +0800
Subject: [PATCH 7/7] Fix control path where we have str as uninitialized
string
@@ -21,7 +21,7 @@ note: 'str' was declared here
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Rebase to 0.170
+Rebase to 0.172
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
@@ -29,17 +29,17 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
1 file changed, 1 insertion(+)
diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
-index 831afbe..60fd6d4 100644
+index a7e03f9..837a3a8 100644
--- a/libcpu/i386_disasm.c
+++ b/libcpu/i386_disasm.c
@@ -821,6 +821,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)),
}
- /* Fallthrough */
+ FALLTHROUGH;
default:
+ str = "";
assert (! "INVALID not handled");
}
}
--
-1.8.3.1
+2.7.4
diff --git a/poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
index a42ce7b35..0f01a3218 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
@@ -1,90 +1,32 @@
-From ef0981744669149a00dd0439a54dac30de7b56a7 Mon Sep 17 00:00:00 2001
+From 207be05c44da5c4c31179a34660e176145ff8d4b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 16 Aug 2017 10:06:26 +0800
+Date: Mon, 2 Jul 2018 09:52:23 +0800
Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
compiling it on musl
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Rebase to 0.170
+Rebase to 0.174
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
---
Makefile.am | 2 +-
- lib/color.c | 3 ++-
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 +-
+ lib/system.h | 12 +++++++++++-
libdw/Makefile.am | 3 ++-
- libdw/libdw_alloc.c | 2 +-
- libdwfl/dwfl_build_id_find_elf.c | 3 ++-
+ libdwfl/dwfl_build_id_find_elf.c | 1 +
libdwfl/dwfl_error.c | 4 +++-
libdwfl/dwfl_module_getdwarf.c | 1 +
- libdwfl/find-debuginfo.c | 2 +-
libdwfl/libdwfl_crc32_file.c | 9 +++++++++
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 +-
- 69 files changed, 95 insertions(+), 64 deletions(-)
+ 12 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/Makefile.am b/Makefile.am
-index 2ff444e7..41f77df8 100644
+index 2ff444e..41f77df 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,7 @@ pkginclude_HEADERS = version.h
@@ -96,28 +38,8 @@ index 2ff444e7..41f77df8 100644
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
COPYING COPYING-GPLV2 COPYING-LGPLV3
-diff --git a/lib/color.c b/lib/color.c
-index f62389d5..a2a84b46 100644
---- a/lib/color.c
-+++ b/lib/color.c
-@@ -32,13 +32,14 @@
- #endif
-
- #include <argp.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
- #include "libeu.h"
- #include "color.h"
-+#include "system.h"
-
- /* Prototype for option handler. */
- static error_t parse_opt (int key, char *arg, struct argp_state *state);
diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h
-index dac2a5f5..43016fc3 100644
+index dac2a5f..43016fc 100644
--- a/lib/fixedsizehash.h
+++ b/lib/fixedsizehash.h
@@ -30,7 +30,6 @@
@@ -129,10 +51,19 @@ index dac2a5f5..43016fc3 100644
#include <system.h>
diff --git a/lib/system.h b/lib/system.h
-index 92033355..1a601319 100644
+index 292082b..308a762 100644
--- a/lib/system.h
+++ b/lib/system.h
-@@ -50,6 +50,16 @@
+@@ -30,7 +30,7 @@
+ #define LIB_SYSTEM_H 1
+
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <sys/param.h>
+@@ -51,6 +51,16 @@
#else
# error "Unknown byte order"
#endif
@@ -149,89 +80,11 @@ index 92033355..1a601319 100644
#ifndef MAX
#define MAX(m, n) ((m) < (n) ? (n) : (m))
-diff --git a/lib/xmalloc.c b/lib/xmalloc.c
-index 0cde384f..217b0541 100644
---- a/lib/xmalloc.c
-+++ b/lib/xmalloc.c
-@@ -30,7 +30,7 @@
- # include <config.h>
- #endif
-
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stddef.h>
- #include <stdlib.h>
-diff --git a/libasm/asm_end.c b/libasm/asm_end.c
-index ced24f50..4ad918c4 100644
---- a/libasm/asm_end.c
-+++ b/libasm/asm_end.c
-@@ -32,7 +32,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdio.h>
- #include <stdlib.h>
-diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c
-index ddbb25df..74a598d9 100644
---- a/libasm/asm_newscn.c
-+++ b/libasm/asm_newscn.c
-@@ -32,7 +32,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdlib.h>
- #include <string.h>
-diff --git a/libcpu/i386_gendis.c b/libcpu/i386_gendis.c
-index aae5eae6..6d760165 100644
---- a/libcpu/i386_gendis.c
-+++ b/libcpu/i386_gendis.c
-@@ -31,7 +31,7 @@
- # include <config.h>
- #endif
-
--#include <error.h>
-+#include <err.h>
- #include <errno.h>
- #include <stdio.h>
- #include <stdlib.h>
-diff --git a/libcpu/i386_lex.c b/libcpu/i386_lex.c
-index ba5f4aa5..b1e41916 100644
---- a/libcpu/i386_lex.c
-+++ b/libcpu/i386_lex.c
-@@ -577,7 +577,7 @@ char *i386_text;
- #endif
-
- #include <ctype.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
-
- #include <libeu.h>
-diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c
-index 6fa7ce3d..bb270061 100644
---- a/libcpu/i386_parse.c
-+++ b/libcpu/i386_parse.c
-@@ -107,7 +107,7 @@
- #include <assert.h>
- #include <ctype.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <inttypes.h>
- #include <libintl.h>
- #include <math.h>
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
-index ff8c291e..89e792aa 100644
+index 7a3d532..7ac1241 100644
--- a/libdw/Makefile.am
+++ b/libdw/Makefile.am
-@@ -105,7 +105,8 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
+@@ -108,7 +108,8 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \
../libdwfl/libdwfl_pic.a ../libebl/libebl.a
libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
@@ -241,21 +94,8 @@ index ff8c291e..89e792aa 100644
libdw_so_SOURCES =
libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
# The rpath is necessary for libebl because its $ORIGIN use will
-diff --git a/libdw/libdw_alloc.c b/libdw/libdw_alloc.c
-index 28a8cf6e..29aeb3f7 100644
---- a/libdw/libdw_alloc.c
-+++ b/libdw/libdw_alloc.c
-@@ -31,7 +31,7 @@
- # include <config.h>
- #endif
-
--#include <error.h>
-+#include <err.h>
- #include <errno.h>
- #include <stdlib.h>
- #include "libdwP.h"
diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c
-index ee0c1646..b06ab596 100644
+index cc6c3f6..b06ab59 100644
--- a/libdwfl/dwfl_build_id_find_elf.c
+++ b/libdwfl/dwfl_build_id_find_elf.c
@@ -31,6 +31,7 @@
@@ -266,17 +106,8 @@ index ee0c1646..b06ab596 100644
#include <inttypes.h>
#include <fcntl.h>
#include <unistd.h>
-@@ -99,7 +100,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 7bcf61cc..c345797a 100644
+index 7bcf61c..c345797 100644
--- a/libdwfl/dwfl_error.c
+++ b/libdwfl/dwfl_error.c
@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
@@ -298,7 +129,7 @@ index 7bcf61cc..c345797a 100644
return elf_errmsg (error & 0xffff);
case OTHER_ERROR (LIBDW):
diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c
-index 9775aced..511c4a6a 100644
+index af6838a..c079d6a 100644
--- a/libdwfl/dwfl_module_getdwarf.c
+++ b/libdwfl/dwfl_module_getdwarf.c
@@ -35,6 +35,7 @@
@@ -309,21 +140,8 @@ index 9775aced..511c4a6a 100644
#include "../libdw/libdwP.h" /* DWARF_E_* values are here. */
#include "../libelf/libelfP.h"
#include "system.h"
-diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c
-index 6d5a42a6..9267788d 100644
---- a/libdwfl/find-debuginfo.c
-+++ b/libdwfl/find-debuginfo.c
-@@ -389,7 +389,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 f849128d..6f0aca1b 100644
+index f849128..6f0aca1 100644
--- a/libdwfl/libdwfl_crc32_file.c
+++ b/libdwfl/libdwfl_crc32_file.c
@@ -29,6 +29,15 @@
@@ -343,7 +161,7 @@ index f849128d..6f0aca1b 100644
#define crc32 __libdwfl_crc32
#include <libdwflP.h>
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
-index 9d0fef2c..9fc09b88 100644
+index 9d0fef2..9fc09b8 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -40,6 +40,7 @@
@@ -354,21 +172,8 @@ index 9d0fef2c..9fc09b88 100644
#include <inttypes.h>
#include <errno.h>
#include <stdio.h>
-diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
-index 53713963..2e66dfdd 100644
---- a/libebl/eblopenbackend.c
-+++ b/libebl/eblopenbackend.c
-@@ -32,7 +32,7 @@
-
- #include <assert.h>
- #include <dlfcn.h>
--#include <error.h>
-+#include <err.h>
- #include <libelfP.h>
- #include <dwarf.h>
- #include <stdlib.h>
diff --git a/libelf/elf.h b/libelf/elf.h
-index 5cf2b934..990b3afb 100644
+index 5dc632b..14da1b7 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -21,7 +21,9 @@
@@ -382,9 +187,9 @@ index 5cf2b934..990b3afb 100644
/* Standard ELF types. */
-@@ -3705,6 +3707,8 @@ enum
- #define R_BPF_NONE 0 /* No reloc */
- #define R_BPF_MAP_FD 1 /* Map fd to pointer */
+@@ -3937,6 +3939,8 @@ enum
+ #define R_METAG_TLS_LE_HI16 60
+ #define R_METAG_TLS_LE_LO16 61
-__END_DECLS
+#ifdef __cplusplus
@@ -393,7 +198,7 @@ index 5cf2b934..990b3afb 100644
#endif /* elf.h */
diff --git a/libelf/libelf.h b/libelf/libelf.h
-index 547c0f50..dd78799e 100644
+index d11358c..4cf9272 100644
--- a/libelf/libelf.h
+++ b/libelf/libelf.h
@@ -29,6 +29,7 @@
@@ -405,7 +210,7 @@ index 547c0f50..dd78799e 100644
#include <sys/types.h>
diff --git a/libelf/libelfP.h b/libelf/libelfP.h
-index 7ee6625a..58408997 100644
+index ed216c8..415e6f6 100644
--- a/libelf/libelfP.h
+++ b/libelf/libelfP.h
@@ -32,6 +32,7 @@
@@ -416,614 +221,6 @@ index 7ee6625a..58408997 100644
#include <errno.h>
#include <stdbool.h>
-diff --git a/src/addr2line.c b/src/addr2line.c
-index 444ee52c..9596fa67 100644
---- a/src/addr2line.c
-+++ b/src/addr2line.c
-@@ -23,7 +23,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <inttypes.h>
- #include <libdwfl.h>
-diff --git a/src/ar.c b/src/ar.c
-index ec32cee5..4efd729c 100644
---- a/src/ar.c
-+++ b/src/ar.c
-@@ -22,7 +22,7 @@
-
- #include <argp.h>
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <libintl.h>
-diff --git a/src/arlib.c b/src/arlib.c
-index e0839aab..1143658f 100644
---- a/src/arlib.c
-+++ b/src/arlib.c
-@@ -21,7 +21,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <gelf.h>
- #include <inttypes.h>
- #include <libintl.h>
-diff --git a/src/arlib2.c b/src/arlib2.c
-index 553fc57b..46443d0e 100644
---- a/src/arlib2.c
-+++ b/src/arlib2.c
-@@ -20,7 +20,7 @@
- # include <config.h>
- #endif
-
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <limits.h>
- #include <string.h>
-diff --git a/src/elfcmp.c b/src/elfcmp.c
-index 50464207..cff183fa 100644
---- a/src/elfcmp.c
-+++ b/src/elfcmp.c
-@@ -23,7 +23,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <locale.h>
- #include <libintl.h>
-diff --git a/src/elflint.c b/src/elflint.c
-index df1b3a03..67d8d134 100644
---- a/src/elflint.c
-+++ b/src/elflint.c
-@@ -24,7 +24,7 @@
- #include <assert.h>
- #include <byteswap.h>
- #include <endian.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-diff --git a/src/findtextrel.c b/src/findtextrel.c
-index 8f1e239a..71463af3 100644
---- a/src/findtextrel.c
-+++ b/src/findtextrel.c
-@@ -23,7 +23,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <libdw.h>
-diff --git a/src/nm.c b/src/nm.c
-index 969c6d35..3113c04c 100644
---- a/src/nm.c
-+++ b/src/nm.c
-@@ -26,7 +26,7 @@
- #include <ctype.h>
- #include <dwarf.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-diff --git a/src/objdump.c b/src/objdump.c
-index 0dd9a6aa..9c8bf149 100644
---- a/src/objdump.c
-+++ b/src/objdump.c
-@@ -21,7 +21,7 @@
- #endif
-
- #include <argp.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <inttypes.h>
- #include <libintl.h>
-diff --git a/src/ranlib.c b/src/ranlib.c
-index cc0ee233..ae851e40 100644
---- a/src/ranlib.c
-+++ b/src/ranlib.c
-@@ -24,7 +24,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <libintl.h>
-diff --git a/src/readelf.c b/src/readelf.c
-index 6a27e7e0..4759a965 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -25,7 +25,7 @@
- #include <ctype.h>
- #include <dwarf.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-diff --git a/src/size.c b/src/size.c
-index ad8dbcbb..fd83be06 100644
---- a/src/size.c
-+++ b/src/size.c
-@@ -21,7 +21,7 @@
- #endif
-
- #include <argp.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-diff --git a/src/stack.c b/src/stack.c
-index 6f2ff69f..6da0243d 100644
---- a/src/stack.c
-+++ b/src/stack.c
-@@ -18,7 +18,7 @@
- #include <config.h>
- #include <assert.h>
- #include <argp.h>
--#include <error.h>
-+#include <err.h>
- #include <stdlib.h>
- #include <inttypes.h>
- #include <stdio.h>
-diff --git a/src/strings.c b/src/strings.c
-index 03d0f133..5c311cbd 100644
---- a/src/strings.c
-+++ b/src/strings.c
-@@ -25,7 +25,7 @@
- #include <ctype.h>
- #include <endian.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-diff --git a/src/strip.c b/src/strip.c
-index c7830ec6..0d7f148d 100644
---- a/src/strip.c
-+++ b/src/strip.c
-@@ -24,7 +24,7 @@
- #include <assert.h>
- #include <byteswap.h>
- #include <endian.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <fnmatch.h>
- #include <gelf.h>
-diff --git a/src/unstrip.c b/src/unstrip.c
-index 50749093..3d4f9525 100644
---- a/src/unstrip.c
-+++ b/src/unstrip.c
-@@ -31,7 +31,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <fnmatch.h>
- #include <libintl.h>
-diff --git a/tests/addrscopes.c b/tests/addrscopes.c
-index 791569f5..54f4311b 100644
---- a/tests/addrscopes.c
-+++ b/tests/addrscopes.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
-
-
-diff --git a/tests/allregs.c b/tests/allregs.c
-index 286f7e3c..c9de0897 100644
---- a/tests/allregs.c
-+++ b/tests/allregs.c
-@@ -21,7 +21,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include <argp.h>
- #include <assert.h>
-diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c
-index a387d8ff..955c27d1 100644
---- a/tests/backtrace-data.c
-+++ b/tests/backtrace-data.c
-@@ -27,7 +27,7 @@
- #include <dirent.h>
- #include <stdlib.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <unistd.h>
- #include <dwarf.h>
- #if defined(__x86_64__) && defined(__linux__)
-diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
-index 2dc8a9a2..24ca7fb0 100644
---- a/tests/backtrace-dwarf.c
-+++ b/tests/backtrace-dwarf.c
-@@ -22,7 +22,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <unistd.h>
- #include <sys/types.h>
- #include <sys/wait.h>
-diff --git a/tests/backtrace.c b/tests/backtrace.c
-index f5dd761f..a93a8f03 100644
---- a/tests/backtrace.c
-+++ b/tests/backtrace.c
-@@ -24,7 +24,7 @@
- #include <dirent.h>
- #include <stdlib.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <unistd.h>
- #include <dwarf.h>
- #ifdef __linux__
-diff --git a/tests/buildid.c b/tests/buildid.c
-index 87c18773..2953e6bb 100644
---- a/tests/buildid.c
-+++ b/tests/buildid.c
-@@ -23,7 +23,7 @@
- #include ELFUTILS_HEADER(elf)
- #include ELFUTILS_HEADER(dwelf)
- #include <stdio.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <stdlib.h>
- #include <sys/types.h>
-diff --git a/tests/debugaltlink.c b/tests/debugaltlink.c
-index 6d97d500..ee7e559e 100644
---- a/tests/debugaltlink.c
-+++ b/tests/debugaltlink.c
-@@ -23,7 +23,7 @@
- #include ELFUTILS_HEADER(dw)
- #include ELFUTILS_HEADER(dwelf)
- #include <stdio.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <stdlib.h>
- #include <sys/types.h>
-diff --git a/tests/debuglink.c b/tests/debuglink.c
-index 935d1029..741cb814 100644
---- a/tests/debuglink.c
-+++ b/tests/debuglink.c
-@@ -21,7 +21,7 @@
- #include <errno.h>
- #include ELFUTILS_HEADER(dwelf)
- #include <stdio.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <stdlib.h>
- #include <sys/types.h>
-diff --git a/tests/deleted.c b/tests/deleted.c
-index 6be35bc2..01907113 100644
---- a/tests/deleted.c
-+++ b/tests/deleted.c
-@@ -21,7 +21,7 @@
- #include <unistd.h>
- #include <assert.h>
- #include <stdio.h>
--#include <error.h>
-+#include <err.h>
- #include <errno.h>
- #ifdef __linux__
- #include <sys/prctl.h>
-diff --git a/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c
-index 21e470a3..1ea1e3b2 100644
---- a/tests/dwfl-addr-sect.c
-+++ b/tests/dwfl-addr-sect.c
-@@ -23,7 +23,7 @@
- #include <stdio_ext.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include <argp.h>
- #include ELFUTILS_HEADER(dwfl)
-diff --git a/tests/dwfl-bug-addr-overflow.c b/tests/dwfl-bug-addr-overflow.c
-index aa8030e1..02c8bef9 100644
---- a/tests/dwfl-bug-addr-overflow.c
-+++ b/tests/dwfl-bug-addr-overflow.c
-@@ -20,7 +20,7 @@
- #include <inttypes.h>
- #include <stdio.h>
- #include <stdio_ext.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include ELFUTILS_HEADER(dwfl)
-
-diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c
-index 689cdd79..5973da39 100644
---- a/tests/dwfl-bug-fd-leak.c
-+++ b/tests/dwfl-bug-fd-leak.c
-@@ -24,7 +24,7 @@
- #include <dirent.h>
- #include <stdlib.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <unistd.h>
- #include <dwarf.h>
-
-diff --git a/tests/dwfl-bug-getmodules.c b/tests/dwfl-bug-getmodules.c
-index 1ee989f8..fd62e653 100644
---- a/tests/dwfl-bug-getmodules.c
-+++ b/tests/dwfl-bug-getmodules.c
-@@ -18,7 +18,7 @@
- #include <config.h>
- #include ELFUTILS_HEADER(dwfl)
-
--#include <error.h>
-+#include <err.h>
-
- static const Dwfl_Callbacks callbacks =
- {
-diff --git a/tests/dwfl-report-elf-align.c b/tests/dwfl-report-elf-align.c
-index a4e97d3c..f471587c 100644
---- a/tests/dwfl-report-elf-align.c
-+++ b/tests/dwfl-report-elf-align.c
-@@ -20,7 +20,7 @@
- #include <inttypes.h>
- #include <stdio.h>
- #include <stdio_ext.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include <string.h>
- #include <stdlib.h>
-diff --git a/tests/dwfllines.c b/tests/dwfllines.c
-index 90379dd2..cbdf6c4c 100644
---- a/tests/dwfllines.c
-+++ b/tests/dwfllines.c
-@@ -27,7 +27,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
-
- int
- main (int argc, char *argv[])
-diff --git a/tests/dwflmodtest.c b/tests/dwflmodtest.c
-index 0027f96b..e68d3bca 100644
---- a/tests/dwflmodtest.c
-+++ b/tests/dwflmodtest.c
-@@ -23,7 +23,7 @@
- #include <stdio_ext.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include <argp.h>
- #include ELFUTILS_HEADER(dwfl)
-diff --git a/tests/dwflsyms.c b/tests/dwflsyms.c
-index 49ac3346..cf078301 100644
---- a/tests/dwflsyms.c
-+++ b/tests/dwflsyms.c
-@@ -25,7 +25,7 @@
- #include <stdio.h>
- #include <stdio_ext.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
-
- static const char *
-diff --git a/tests/early-offscn.c b/tests/early-offscn.c
-index 924cb9ef..6f60d5a3 100644
---- a/tests/early-offscn.c
-+++ b/tests/early-offscn.c
-@@ -19,7 +19,7 @@
- #endif
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <stdio.h>
-diff --git a/tests/ecp.c b/tests/ecp.c
-index 38a6859e..743cea5d 100644
---- a/tests/ecp.c
-+++ b/tests/ecp.c
-@@ -20,7 +20,7 @@
- #endif
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <stdlib.h>
-diff --git a/tests/find-prologues.c b/tests/find-prologues.c
-index ba8ae371..76f5f047 100644
---- a/tests/find-prologues.c
-+++ b/tests/find-prologues.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <fnmatch.h>
-
-diff --git a/tests/funcretval.c b/tests/funcretval.c
-index 8d19d117..c8aaa93d 100644
---- a/tests/funcretval.c
-+++ b/tests/funcretval.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <fnmatch.h>
-
-diff --git a/tests/funcscopes.c b/tests/funcscopes.c
-index 9c901858..dbccb89e 100644
---- a/tests/funcscopes.c
-+++ b/tests/funcscopes.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <fnmatch.h>
-
-diff --git a/tests/getsrc_die.c b/tests/getsrc_die.c
-index 055aede0..9c394dd0 100644
---- a/tests/getsrc_die.c
-+++ b/tests/getsrc_die.c
-@@ -19,7 +19,7 @@
- #endif
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <inttypes.h>
- #include <libelf.h>
-diff --git a/tests/line2addr.c b/tests/line2addr.c
-index e0d65d3d..9bf0023b 100644
---- a/tests/line2addr.c
-+++ b/tests/line2addr.c
-@@ -26,7 +26,7 @@
- #include <locale.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
-
-
- static void
-diff --git a/tests/low_high_pc.c b/tests/low_high_pc.c
-index d0f43023..8da4fbdf 100644
---- a/tests/low_high_pc.c
-+++ b/tests/low_high_pc.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <fnmatch.h>
-
-diff --git a/tests/md5-sha1-test.c b/tests/md5-sha1-test.c
-index d50355e9..3c41f40b 100644
---- a/tests/md5-sha1-test.c
-+++ b/tests/md5-sha1-test.c
-@@ -19,7 +19,7 @@
- #endif
-
- #include <string.h>
--#include <error.h>
-+#include <err.h>
-
- #include "md5.h"
- #include "sha1.h"
-diff --git a/tests/rdwrmmap.c b/tests/rdwrmmap.c
-index 6f027dfe..1ce5e6ed 100644
---- a/tests/rdwrmmap.c
-+++ b/tests/rdwrmmap.c
-@@ -19,7 +19,7 @@
- #endif
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <stdio.h>
- #include <fcntl.h>
- #include <unistd.h>
-diff --git a/tests/saridx.c b/tests/saridx.c
-index 8a450d82..b3878013 100644
---- a/tests/saridx.c
-+++ b/tests/saridx.c
-@@ -17,7 +17,7 @@
-
- #include <config.h>
-
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <stdio.h>
-diff --git a/tests/sectiondump.c b/tests/sectiondump.c
-index 3033fedc..8e888db3 100644
---- a/tests/sectiondump.c
-+++ b/tests/sectiondump.c
-@@ -18,7 +18,7 @@
- #include <config.h>
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-diff --git a/tests/varlocs.c b/tests/varlocs.c
-index c3fba89e..e043ea2c 100644
---- a/tests/varlocs.c
-+++ b/tests/varlocs.c
-@@ -25,7 +25,7 @@
- #include <dwarf.h>
- #include <stdio.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c
-index b876c10b..afb28232 100644
---- a/tests/vdsosyms.c
-+++ b/tests/vdsosyms.c
-@@ -18,7 +18,7 @@
- #include <config.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <inttypes.h>
- #include <stdio.h>
- #include <string.h>
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch b/poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
index e0291b4cf..8c48f4d1b 100644
--- a/poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
@@ -1,3 +1,6 @@
+Upstream-Status: Pending [from debian]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001
From: James Cowgill <james410@cowgill.org.uk>
Date: Mon, 5 Jan 2015 15:16:58 +0000
@@ -8,10 +11,6 @@ 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 <james410@cowgill.org.uk>
-
-Upstream-Status: Backport [from debian]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
---
backends/mips_init.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff b/poky/meta/recipes-devtools/elfutils/files/debian/0001-arm_backend.patch
index 50f4b059e..4ed81194b 100644
--- a/poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff
+++ b/poky/meta/recipes-devtools/elfutils/files/debian/0001-arm_backend.patch
@@ -1,8 +1,28 @@
-Upstream-Status: Backport [from debian]
+From a95f370bc2690c150c46f215543de278469900eb Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 29 Jun 2018 15:42:39 +0800
+Subject: [PATCH] arm_backend
+
+Upstream-Status: Pending [from debian]
+arm_backend.diff and rebase to 0.172
+
+http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz
+
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/arm_init.c | 18 ++++-
+ backends/arm_regs.c | 132 ++++++++++++++++++++++++++++++++++++
+ backends/arm_retval.c | 43 +++++++++++-
+ backends/libebl_arm.h | 9 +++
+ libelf/elf.h | 11 +++
+ tests/run-addrcfi.sh | 93 ++++++++++++++++++++++++-
+ tests/run-allregs.sh | 95 +++++++++++++++++++++++++-
+ tests/run-readelf-mixed-corenote.sh | 11 ++-
+ 8 files changed, 400 insertions(+), 12 deletions(-)
+ create mode 100644 backends/libebl_arm.h
-Index: b/backends/arm_init.c
-===================================================================
+diff --git a/backends/arm_init.c b/backends/arm_init.c
+index f2b1b11..1b71f16 100644
--- a/backends/arm_init.c
+++ b/backends/arm_init.c
@@ -35,20 +35,31 @@
@@ -38,7 +58,7 @@ Index: b/backends/arm_init.c
/* We handle it. */
eh->name = "ARM";
arm_init_reloc (eh);
-@@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unuse
+@@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unused)),
HOOK (eh, core_note);
HOOK (eh, auxv_info);
HOOK (eh, check_object_attribute);
@@ -50,8 +70,8 @@ Index: b/backends/arm_init.c
HOOK (eh, abi_cfi);
HOOK (eh, check_reloc_target_type);
HOOK (eh, symbol_type_name);
-Index: b/backends/arm_regs.c
-===================================================================
+diff --git a/backends/arm_regs.c b/backends/arm_regs.c
+index a46a4c9..418c931 100644
--- a/backends/arm_regs.c
+++ b/backends/arm_regs.c
@@ -31,6 +31,7 @@
@@ -62,7 +82,7 @@ Index: b/backends/arm_regs.c
#include <dwarf.h>
#define BACKEND arm_
-@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute_
+@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
break;
case 16 + 0 ... 16 + 7:
@@ -70,9 +90,9 @@ Index: b/backends/arm_regs.c
+ * but gcc maps FPA registers here
+ */
regno += 96 - 16;
- /* Fall through. */
+ FALLTHROUGH;
case 96 + 0 ... 96 + 7:
-@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute_
+@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
namelen = 2;
break;
@@ -212,8 +232,8 @@ Index: b/backends/arm_regs.c
*setname = "VFP";
*type = DW_ATE_float;
*bits = 64;
-Index: b/backends/arm_retval.c
-===================================================================
+diff --git a/backends/arm_retval.c b/backends/arm_retval.c
+index 1c28f01..313e4eb 100644
--- a/backends/arm_retval.c
+++ b/backends/arm_retval.c
@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] =
@@ -242,7 +262,7 @@ Index: b/backends/arm_retval.c
{
/* Start with the function's type, and get the DW_AT_type attribute,
which is the type of the return value. */
-@@ -98,6 +106,21 @@ arm_return_value_location (Dwarf_Die *fu
+@@ -98,6 +106,21 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
else
return -1;
}
@@ -264,7 +284,7 @@ Index: b/backends/arm_retval.c
if (size <= 16)
{
intreg:
-@@ -106,6 +129,7 @@ arm_return_value_location (Dwarf_Die *fu
+@@ -106,6 +129,7 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
}
aggregate:
@@ -272,7 +292,7 @@ Index: b/backends/arm_retval.c
*locp = loc_aggregate;
return nloc_aggregate;
}
-@@ -125,3 +149,18 @@ arm_return_value_location (Dwarf_Die *fu
+@@ -125,3 +149,18 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
DWARF and might be valid. */
return -2;
}
@@ -291,11 +311,26 @@ Index: b/backends/arm_retval.c
+ return arm_return_value_location_ (functypedie, locp, 0);
+}
+
-Index: b/libelf/elf.h
-===================================================================
+diff --git a/backends/libebl_arm.h b/backends/libebl_arm.h
+new file mode 100644
+index 0000000..c00770c
+--- /dev/null
++++ b/backends/libebl_arm.h
+@@ -0,0 +1,9 @@
++#ifndef _LIBEBL_ARM_H
++#define _LIBEBL_ARM_H 1
++
++#include <libdw.h>
++
++extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
++extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
++
++#endif
+diff --git a/libelf/elf.h b/libelf/elf.h
+index 6c9f61e..6d82fef 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
-@@ -2593,6 +2593,9 @@ enum
+@@ -2692,6 +2692,9 @@ enum
#define EF_ARM_EABI_VER4 0x04000000
#define EF_ARM_EABI_VER5 0x05000000
@@ -305,7 +340,7 @@ Index: b/libelf/elf.h
/* Additional symbol types for Thumb. */
#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
-@@ -2610,12 +2613,19 @@ enum
+@@ -2709,12 +2712,19 @@ enum
/* Processor specific values for the Phdr p_type field. */
#define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
@@ -325,7 +360,7 @@ Index: b/libelf/elf.h
/* AArch64 relocs. */
-@@ -2908,6 +2918,7 @@ enum
+@@ -3007,6 +3017,7 @@ enum
TLS block (LDR, STR). */
#define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative
to GOT origin (LDR). */
@@ -333,22 +368,119 @@ Index: b/libelf/elf.h
#define R_ARM_ME_TOO 128 /* Obsolete. */
#define R_ARM_THM_TLS_DESCSEQ 129
#define R_ARM_THM_TLS_DESCSEQ16 129
-Index: b/backends/libebl_arm.h
-===================================================================
---- /dev/null
-+++ b/backends/libebl_arm.h
-@@ -0,0 +1,9 @@
-+#ifndef _LIBEBL_ARM_H
-+#define _LIBEBL_ARM_H 1
-+
-+#include <libdw.h>
-+
-+extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
-+extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
-+
-+#endif
-Index: b/tests/run-allregs.sh
-===================================================================
+diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh
+index fd89d02..462d7c5 100755
+--- a/tests/run-addrcfi.sh
++++ b/tests/run-addrcfi.sh
+@@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
+ FPA reg21 (f5): undefined
+ FPA reg22 (f6): undefined
+ FPA reg23 (f7): undefined
++ VFP reg64 (s0): undefined
++ VFP reg65 (s1): undefined
++ VFP reg66 (s2): undefined
++ VFP reg67 (s3): undefined
++ VFP reg68 (s4): undefined
++ VFP reg69 (s5): undefined
++ VFP reg70 (s6): undefined
++ VFP reg71 (s7): undefined
++ VFP reg72 (s8): undefined
++ VFP reg73 (s9): undefined
++ VFP reg74 (s10): undefined
++ VFP reg75 (s11): undefined
++ VFP reg76 (s12): undefined
++ VFP reg77 (s13): undefined
++ VFP reg78 (s14): undefined
++ VFP reg79 (s15): undefined
++ VFP reg80 (s16): undefined
++ VFP reg81 (s17): undefined
++ VFP reg82 (s18): undefined
++ VFP reg83 (s19): undefined
++ VFP reg84 (s20): undefined
++ VFP reg85 (s21): undefined
++ VFP reg86 (s22): undefined
++ VFP reg87 (s23): undefined
++ VFP reg88 (s24): undefined
++ VFP reg89 (s25): undefined
++ VFP reg90 (s26): undefined
++ VFP reg91 (s27): undefined
++ VFP reg92 (s28): undefined
++ VFP reg93 (s29): undefined
++ VFP reg94 (s30): undefined
++ VFP reg95 (s31): undefined
+ FPA reg96 (f0): undefined
+ FPA reg97 (f1): undefined
+ FPA reg98 (f2): undefined
+@@ -3562,7 +3594,66 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
+ FPA reg101 (f5): undefined
+ FPA reg102 (f6): undefined
+ FPA reg103 (f7): undefined
+- integer reg128 (spsr): undefined
++ MMX reg104 (wcgr0): undefined
++ MMX reg105 (wcgr1): undefined
++ MMX reg106 (wcgr2): undefined
++ MMX reg107 (wcgr3): undefined
++ MMX reg108 (wcgr4): undefined
++ MMX reg109 (wcgr5): undefined
++ MMX reg110 (wcgr6): undefined
++ MMX reg111 (wcgr7): undefined
++ MMX reg112 (wr0): undefined
++ MMX reg113 (wr1): undefined
++ MMX reg114 (wr2): undefined
++ MMX reg115 (wr3): undefined
++ MMX reg116 (wr4): undefined
++ MMX reg117 (wr5): undefined
++ MMX reg118 (wr6): undefined
++ MMX reg119 (wr7): undefined
++ MMX reg120 (wr8): undefined
++ MMX reg121 (wr9): undefined
++ MMX reg122 (wr10): undefined
++ MMX reg123 (wr11): undefined
++ MMX reg124 (wr12): undefined
++ MMX reg125 (wr13): undefined
++ MMX reg126 (wr14): undefined
++ MMX reg127 (wr15): undefined
++ state reg128 (spsr): undefined
++ state reg129 (spsr_fiq): undefined
++ state reg130 (spsr_irq): undefined
++ state reg131 (spsr_abt): undefined
++ state reg132 (spsr_und): undefined
++ state reg133 (spsr_svc): undefined
++ integer reg144 (r8_usr): undefined
++ integer reg145 (r9_usr): undefined
++ integer reg146 (r10_usr): undefined
++ integer reg147 (r11_usr): undefined
++ integer reg148 (r12_usr): undefined
++ integer reg149 (r13_usr): undefined
++ integer reg150 (r14_usr): undefined
++ integer reg151 (r8_fiq): undefined
++ integer reg152 (r9_fiq): undefined
++ integer reg153 (r10_fiq): undefined
++ integer reg154 (r11_fiq): undefined
++ integer reg155 (r12_fiq): undefined
++ integer reg156 (r13_fiq): undefined
++ integer reg157 (r14_fiq): undefined
++ integer reg158 (r13_irq): undefined
++ integer reg159 (r14_irq): undefined
++ integer reg160 (r13_abt): undefined
++ integer reg161 (r14_abt): undefined
++ integer reg162 (r13_und): undefined
++ integer reg163 (r14_und): undefined
++ integer reg164 (r13_svc): undefined
++ integer reg165 (r14_svc): undefined
++ MMX reg192 (wc0): undefined
++ MMX reg193 (wc1): undefined
++ MMX reg194 (wc2): undefined
++ MMX reg195 (wc3): undefined
++ MMX reg196 (wc4): undefined
++ MMX reg197 (wc5): undefined
++ MMX reg198 (wc6): undefined
++ MMX reg199 (wc7): undefined
+ VFP reg256 (d0): undefined
+ VFP reg257 (d1): undefined
+ VFP reg258 (d2): undefined
+diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh
+index 7ddd452..a31dba4 100755
--- a/tests/run-allregs.sh
+++ b/tests/run-allregs.sh
@@ -2672,7 +2672,28 @@ integer registers:
@@ -468,11 +600,11 @@ Index: b/tests/run-allregs.sh
EOF
# See run-readelf-mixed-corenote.sh for instructions to regenerate
-Index: b/tests/run-readelf-mixed-corenote.sh
-===================================================================
+diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh
+index 86171c4..018612f 100755
--- a/tests/run-readelf-mixed-corenote.sh
+++ b/tests/run-readelf-mixed-corenote.sh
-@@ -31,12 +31,11 @@ Note segment of 892 bytes at offset 0x27
+@@ -31,12 +31,11 @@ Note segment of 892 bytes at offset 0x274:
pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000
orig_r0: -1, fpvalid: 1
@@ -490,114 +622,6 @@ Index: b/tests/run-readelf-mixed-corenote.sh
CORE 124 PRPSINFO
state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500
uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
-Index: b/tests/run-addrcfi.sh
-===================================================================
---- a/tests/run-addrcfi.sh
-+++ b/tests/run-addrcfi.sh
-@@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matc
- FPA reg21 (f5): undefined
- FPA reg22 (f6): undefined
- FPA reg23 (f7): undefined
-+ VFP reg64 (s0): undefined
-+ VFP reg65 (s1): undefined
-+ VFP reg66 (s2): undefined
-+ VFP reg67 (s3): undefined
-+ VFP reg68 (s4): undefined
-+ VFP reg69 (s5): undefined
-+ VFP reg70 (s6): undefined
-+ VFP reg71 (s7): undefined
-+ VFP reg72 (s8): undefined
-+ VFP reg73 (s9): undefined
-+ VFP reg74 (s10): undefined
-+ VFP reg75 (s11): undefined
-+ VFP reg76 (s12): undefined
-+ VFP reg77 (s13): undefined
-+ VFP reg78 (s14): undefined
-+ VFP reg79 (s15): undefined
-+ VFP reg80 (s16): undefined
-+ VFP reg81 (s17): undefined
-+ VFP reg82 (s18): undefined
-+ VFP reg83 (s19): undefined
-+ VFP reg84 (s20): undefined
-+ VFP reg85 (s21): undefined
-+ VFP reg86 (s22): undefined
-+ VFP reg87 (s23): undefined
-+ VFP reg88 (s24): undefined
-+ VFP reg89 (s25): undefined
-+ VFP reg90 (s26): undefined
-+ VFP reg91 (s27): undefined
-+ VFP reg92 (s28): undefined
-+ VFP reg93 (s29): undefined
-+ VFP reg94 (s30): undefined
-+ VFP reg95 (s31): undefined
- FPA reg96 (f0): undefined
- FPA reg97 (f1): undefined
- FPA reg98 (f2): undefined
-@@ -3562,7 +3594,66 @@ dwarf_cfi_addrframe (.eh_frame): no matc
- FPA reg101 (f5): undefined
- FPA reg102 (f6): undefined
- FPA reg103 (f7): undefined
-- integer reg128 (spsr): undefined
-+ MMX reg104 (wcgr0): undefined
-+ MMX reg105 (wcgr1): undefined
-+ MMX reg106 (wcgr2): undefined
-+ MMX reg107 (wcgr3): undefined
-+ MMX reg108 (wcgr4): undefined
-+ MMX reg109 (wcgr5): undefined
-+ MMX reg110 (wcgr6): undefined
-+ MMX reg111 (wcgr7): undefined
-+ MMX reg112 (wr0): undefined
-+ MMX reg113 (wr1): undefined
-+ MMX reg114 (wr2): undefined
-+ MMX reg115 (wr3): undefined
-+ MMX reg116 (wr4): undefined
-+ MMX reg117 (wr5): undefined
-+ MMX reg118 (wr6): undefined
-+ MMX reg119 (wr7): undefined
-+ MMX reg120 (wr8): undefined
-+ MMX reg121 (wr9): undefined
-+ MMX reg122 (wr10): undefined
-+ MMX reg123 (wr11): undefined
-+ MMX reg124 (wr12): undefined
-+ MMX reg125 (wr13): undefined
-+ MMX reg126 (wr14): undefined
-+ MMX reg127 (wr15): undefined
-+ state reg128 (spsr): undefined
-+ state reg129 (spsr_fiq): undefined
-+ state reg130 (spsr_irq): undefined
-+ state reg131 (spsr_abt): undefined
-+ state reg132 (spsr_und): undefined
-+ state reg133 (spsr_svc): undefined
-+ integer reg144 (r8_usr): undefined
-+ integer reg145 (r9_usr): undefined
-+ integer reg146 (r10_usr): undefined
-+ integer reg147 (r11_usr): undefined
-+ integer reg148 (r12_usr): undefined
-+ integer reg149 (r13_usr): undefined
-+ integer reg150 (r14_usr): undefined
-+ integer reg151 (r8_fiq): undefined
-+ integer reg152 (r9_fiq): undefined
-+ integer reg153 (r10_fiq): undefined
-+ integer reg154 (r11_fiq): undefined
-+ integer reg155 (r12_fiq): undefined
-+ integer reg156 (r13_fiq): undefined
-+ integer reg157 (r14_fiq): undefined
-+ integer reg158 (r13_irq): undefined
-+ integer reg159 (r14_irq): undefined
-+ integer reg160 (r13_abt): undefined
-+ integer reg161 (r14_abt): undefined
-+ integer reg162 (r13_und): undefined
-+ integer reg163 (r14_und): undefined
-+ integer reg164 (r13_svc): undefined
-+ integer reg165 (r14_svc): undefined
-+ MMX reg192 (wc0): undefined
-+ MMX reg193 (wc1): undefined
-+ MMX reg194 (wc2): undefined
-+ MMX reg195 (wc3): undefined
-+ MMX reg196 (wc4): undefined
-+ MMX reg197 (wc5): undefined
-+ MMX reg198 (wc6): undefined
-+ MMX reg199 (wc7): undefined
- VFP reg256 (d0): undefined
- VFP reg257 (d1): undefined
- VFP reg258 (d2): undefined
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/0001-disable_werror.patch b/poky/meta/recipes-devtools/elfutils/files/debian/0001-disable_werror.patch
new file mode 100644
index 000000000..0f32b8742
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/debian/0001-disable_werror.patch
@@ -0,0 +1,35 @@
+From 5d45565e71ddab3d7848077b61eb0ca73c0bcbcc Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 29 Jun 2018 16:01:14 +0800
+Subject: [PATCH] disable -Werror as it tends to break with new gcc versions
+
+Bug-Debian: https://bugs.debian.org/886004
+Last-Update: 2018-01-01
+
+Signed-off-by: Helmut Grohne <helmut@subdivi.de>
+
+Upstream-Status: Pending [from debian]
+mdisable_werror.patc and rebase to 0.172
+
+http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ config/eu.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/config/eu.am b/config/eu.am
+index c2cc349..99b368e 100644
+--- a/config/eu.am
++++ b/config/eu.am
+@@ -73,7 +73,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
+ -Wold-style-definition -Wstrict-prototypes \
+ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
+ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
+- $(if $($(*F)_no_Werror),,-Werror) \
+ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
+ $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/0001-fix-gcc7-ftbfs.patch b/poky/meta/recipes-devtools/elfutils/files/debian/0001-fix-gcc7-ftbfs.patch
new file mode 100644
index 000000000..26869a3a7
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/debian/0001-fix-gcc7-ftbfs.patch
@@ -0,0 +1,57 @@
+From 91c0a0da2a8932f163d57db5d9d847bed6822502 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 29 Jun 2018 15:59:57 +0800
+Subject: [PATCH] fix gcc7 ftbfs
+
+Upstream-Status: Pending [from debian]
+fix-gcc7-ftbfs.diff and rebase to 0.172
+
+http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/mips_retval.c | 1 +
+ backends/parisc_retval.c | 1 +
+ src/ar.c | 2 +-
+ 3 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/backends/mips_retval.c b/backends/mips_retval.c
+index 57487bb..e7973a8 100644
+--- a/backends/mips_retval.c
++++ b/backends/mips_retval.c
+@@ -390,6 +390,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ }
+
+ /* Fallthrough to handle large types */
++ /* Fall through. */
+
+ case DW_TAG_array_type:
+ large:
+diff --git a/backends/parisc_retval.c b/backends/parisc_retval.c
+index df7ec3a..988e1fe 100644
+--- a/backends/parisc_retval.c
++++ b/backends/parisc_retval.c
+@@ -167,6 +167,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
+
+ /* Else fall through. */
+ }
++ /* Fall through. */
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+diff --git a/src/ar.c b/src/ar.c
+index 818115b..c77e9f4 100644
+--- a/src/ar.c
++++ b/src/ar.c
+@@ -1073,7 +1073,7 @@ do_oper_delete (const char *arfname, char **argv, int argc,
+ static bool
+ no0print (bool ofmt, char *buf, int bufsize, long int val)
+ {
+- char tmpbuf[bufsize + 1];
++ char tmpbuf[bufsize + 1 + 4];
+ int ret = snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld",
+ bufsize, val);
+ if (ret >= (int) sizeof (tmpbuf))
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff b/poky/meta/recipes-devtools/elfutils/files/debian/0001-hppa_backend.patch
index 56f852a41..2c5d4fa4b 100644
--- a/poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
+++ b/poky/meta/recipes-devtools/elfutils/files/debian/0001-hppa_backend.patch
@@ -1,10 +1,84 @@
-Upstream-Status: Backport [from debian]
+From c510c6c8523246dd79c6ea28d1646b153c23e491 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 29 Jun 2018 15:39:46 +0800
+Subject: [PATCH] hppa_backend
+
+Upstream-Status: Pending [from debian]
+hppa_backend.diff and rebase to 0.172
+
+http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/Makefile.am | 9 +-
+ backends/libebl_parisc.h | 9 ++
+ backends/parisc_init.c | 73 ++++++++++++++++
+ backends/parisc_regs.c | 159 ++++++++++++++++++++++++++++++++++
+ backends/parisc_reloc.def | 128 ++++++++++++++++++++++++++++
+ backends/parisc_retval.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++
+ backends/parisc_symbol.c | 112 ++++++++++++++++++++++++
+ libelf/elf.h | 11 +++
+ 8 files changed, 711 insertions(+), 3 deletions(-)
+ create mode 100644 backends/libebl_parisc.h
+ create mode 100644 backends/parisc_init.c
+ create mode 100644 backends/parisc_regs.c
+ create mode 100644 backends/parisc_reloc.def
+ create mode 100644 backends/parisc_retval.c
+ create mode 100644 backends/parisc_symbol.c
-Index: elfutils-0.170/backends/parisc_init.c
-===================================================================
+diff --git a/backends/Makefile.am b/backends/Makefile.am
+index 80aa00e..1e4b8e9 100644
+--- a/backends/Makefile.am
++++ b/backends/Makefile.am
+@@ -33,16 +33,16 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
+
+
+ modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
+- tilegx m68k bpf riscv
++ tilegx m68k bpf riscv parisc
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
+ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
+ libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
+ libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
+- libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a
++ libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \
++ libebl_parisc_pic.a
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+
+-
+ libelf = ../libelf/libelf.so
+ libdw = ../libdw/libdw.so
+ libeu = ../lib/libeu.a
+@@ -135,6 +135,9 @@ riscv_SRCS = riscv_init.c riscv_symbol.c
+ libebl_riscv_pic_a_SOURCES = $(riscv_SRCS)
+ am_libebl_riscv_pic_a_OBJECTS = $(riscv_SRCS:.c=.os)
+
++parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
++libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
++am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
+
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu)
+ @rm -f $(@:.so=.map)
+diff --git a/backends/libebl_parisc.h b/backends/libebl_parisc.h
+new file mode 100644
+index 0000000..f473b79
+--- /dev/null
++++ b/backends/libebl_parisc.h
+@@ -0,0 +1,9 @@
++#ifndef _LIBEBL_HPPA_H
++#define _LIBEBL_HPPA_H 1
++
++#include <libdw.h>
++
++extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp);
++extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
++
++#endif
+diff --git a/backends/parisc_init.c b/backends/parisc_init.c
+new file mode 100644
+index 0000000..f1e401c
--- /dev/null
-+++ elfutils-0.170/backends/parisc_init.c
++++ b/backends/parisc_init.c
@@ -0,0 +1,73 @@
+/* Initialization of PA-RISC specific backend library.
+ Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
@@ -79,10 +153,11 @@ Index: elfutils-0.170/backends/parisc_init.c
+
+ return MODVERSION;
+}
-Index: elfutils-0.170/backends/parisc_regs.c
-===================================================================
+diff --git a/backends/parisc_regs.c b/backends/parisc_regs.c
+new file mode 100644
+index 0000000..3895f8e
--- /dev/null
-+++ elfutils-0.170/backends/parisc_regs.c
++++ b/backends/parisc_regs.c
@@ -0,0 +1,159 @@
+/* Register names and numbers for PA-RISC DWARF.
+ Copyright (C) 2005, 2006 Red Hat, Inc.
@@ -243,10 +318,11 @@ Index: elfutils-0.170/backends/parisc_regs.c
+ name[namelen++] = '\0';
+ return namelen;
+}
-Index: elfutils-0.170/backends/parisc_reloc.def
-===================================================================
+diff --git a/backends/parisc_reloc.def b/backends/parisc_reloc.def
+new file mode 100644
+index 0000000..1f875ba
--- /dev/null
-+++ elfutils-0.170/backends/parisc_reloc.def
++++ b/backends/parisc_reloc.def
@@ -0,0 +1,128 @@
+/* List the relocation types for PA-RISC. -*- C -*-
+ Copyright (C) 2005 Red Hat, Inc.
@@ -376,10 +452,11 @@ Index: elfutils-0.170/backends/parisc_reloc.def
+RELOC_TYPE (TLS_DTPMOD64, DYN)
+
+#define NO_RELATIVE_RELOC 1
-Index: elfutils-0.170/backends/parisc_retval.c
-===================================================================
+diff --git a/backends/parisc_retval.c b/backends/parisc_retval.c
+new file mode 100644
+index 0000000..df7ec3a
--- /dev/null
-+++ elfutils-0.170/backends/parisc_retval.c
++++ b/backends/parisc_retval.c
@@ -0,0 +1,213 @@
+/* Function return value location for Linux/PA-RISC ABI.
+ Copyright (C) 2005 Red Hat, Inc.
@@ -594,10 +671,11 @@ Index: elfutils-0.170/backends/parisc_retval.c
+ return parisc_return_value_location_ (functypedie, locp, 1);
+}
+
-Index: elfutils-0.170/backends/parisc_symbol.c
-===================================================================
+diff --git a/backends/parisc_symbol.c b/backends/parisc_symbol.c
+new file mode 100644
+index 0000000..d111a76
--- /dev/null
-+++ elfutils-0.170/backends/parisc_symbol.c
++++ b/backends/parisc_symbol.c
@@ -0,0 +1,112 @@
+/* PA-RISC specific symbolic name handling.
+ Copyright (C) 2002, 2005 Red Hat, Inc.
@@ -711,54 +789,11 @@ Index: elfutils-0.170/backends/parisc_symbol.c
+ return ELF_T_NUM;
+ }
+}
-Index: elfutils-0.170/backends/libebl_parisc.h
-===================================================================
---- /dev/null
-+++ elfutils-0.170/backends/libebl_parisc.h
-@@ -0,0 +1,9 @@
-+#ifndef _LIBEBL_HPPA_H
-+#define _LIBEBL_HPPA_H 1
-+
-+#include <libdw.h>
-+
-+extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp);
-+extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
-+
-+#endif
-Index: elfutils-0.170/backends/Makefile.am
-===================================================================
---- elfutils-0.170.orig/backends/Makefile.am
-+++ elfutils-0.170/backends/Makefile.am
-@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
-
-
- modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
-- tilegx m68k bpf
-+ tilegx m68k bpf parisc
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
- libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
- libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
- libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
-- libebl_m68k_pic.a libebl_bpf_pic.a
-+ libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
-
-@@ -124,6 +124,9 @@ cpu_bpf = ../libcpu/libcpu_bpf.a
- libebl_bpf_pic_a_SOURCES = $(bpf_SRCS)
- am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os)
-
-+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
-+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
-+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
-
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu)
- @rm -f $(@:.so=.map)
-Index: elfutils-0.170/libelf/elf.h
-===================================================================
---- elfutils-0.170.orig/libelf/elf.h
-+++ elfutils-0.170/libelf/elf.h
-@@ -2056,16 +2056,24 @@ enum
+diff --git a/libelf/elf.h b/libelf/elf.h
+index f774898..6c9f61e 100644
+--- a/libelf/elf.h
++++ b/libelf/elf.h
+@@ -2153,16 +2153,24 @@ enum
#define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
#define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
#define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
@@ -783,7 +818,7 @@ Index: elfutils-0.170/libelf/elf.h
#define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
#define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
#define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
-@@ -2074,6 +2082,7 @@ enum
+@@ -2171,6 +2179,7 @@ enum
#define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */
#define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */
#define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
@@ -791,7 +826,7 @@ Index: elfutils-0.170/libelf/elf.h
#define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
#define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
#define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
-@@ -2099,6 +2108,8 @@ enum
+@@ -2196,6 +2205,8 @@ enum
#define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
#define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
#define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
@@ -800,3 +835,6 @@ Index: elfutils-0.170/libelf/elf.h
#define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
#define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
#define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.patch b/poky/meta/recipes-devtools/elfutils/files/debian/0001-mips_backend.patch
index 2e0e54b0c..d04da72cc 100644
--- a/poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/debian/0001-mips_backend.patch
@@ -1,11 +1,13 @@
-From 46d0d0ca718093486eeeedf1b44134e9e29b56f7 Mon Sep 17 00:00:00 2001
+From 59ffb86bda845a68d3686afa7bc784131df678f7 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 16 Aug 2017 09:18:59 +0800
-Subject: [PATCH] mips backends
+Date: Fri, 29 Jun 2018 15:45:58 +0800
+Subject: [PATCH] mips_backend
-Upstream-Status: Backport [from debian]
+Upstream-Status: Pending [from debian]
+mips_backend.diff and rebase to 0.172
+
+http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz
-Rebase to 0.170
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
backends/Makefile.am | 8 +-
@@ -23,25 +25,26 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
create mode 100644 backends/mips_symbol.c
diff --git a/backends/Makefile.am b/backends/Makefile.am
-index 7f1f5d4..91baf6e 100644
+index 1e4b8e9..e7bccf8 100644
--- a/backends/Makefile.am
+++ b/backends/Makefile.am
-@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
+@@ -33,13 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
-- tilegx m68k bpf parisc
-+ tilegx m68k bpf parisc mips
+- tilegx m68k bpf riscv parisc
++ tilegx m68k bpf riscv parisc mips
libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
-- libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a
-+ libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a libebl_mips_pic.a
+ libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \
+- libebl_parisc_pic.a
++ libebl_parisc_pic.a libebl_mips_pic.a
noinst_LIBRARIES = $(libebl_pic)
noinst_DATA = $(libebl_pic:_pic.a=.so)
-@@ -128,6 +128,10 @@ parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
+@@ -139,6 +139,10 @@ parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
@@ -698,7 +701,7 @@ index 0000000..ba465fe
+ }
+}
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
-index 1f81477..5371396 100644
+index 8b063f4..5405b0c 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -72,6 +72,8 @@ static const struct
@@ -711,5 +714,5 @@ index 1f81477..5371396 100644
{ "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
{ "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB },
--
-1.8.3.1
+2.7.4
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/0001-mips_readelf_w.patch b/poky/meta/recipes-devtools/elfutils/files/debian/0001-mips_readelf_w.patch
new file mode 100644
index 000000000..f3ab3da8d
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/debian/0001-mips_readelf_w.patch
@@ -0,0 +1,39 @@
+From a188ea1ada6b990b72b91266ae02da058dcd9523 Mon Sep 17 00:00:00 2001
+From: Kurt Roeckx <kurt@roeckx.be>
+Date: Fri, 29 Jun 2018 15:49:32 +0800
+Subject: [PATCH] Make readelf -w output debug information on mips
+
+Bug-Debian: http://bugs.debian.org/662041
+Forwarded: not-needed
+
+Upstreams wants a change where this is handled by a hook that needs
+to be filled in by the backend for the arch.
+
+Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
+
+Upstream-Status: Pending [from debian]
+mips_readelf_w.patch and rebase to 0.172
+
+http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/readelf.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/readelf.c b/src/readelf.c
+index f185897..0db197c 100644
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -10979,7 +10979,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr)
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
+
+- if (shdr != NULL && shdr->sh_type == SHT_PROGBITS)
++ if (shdr != NULL && (
++ (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF)))
+ {
+ static const struct
+ {
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/0001-testsuite-ignore-elflint.patch b/poky/meta/recipes-devtools/elfutils/files/debian/0001-testsuite-ignore-elflint.patch
new file mode 100644
index 000000000..f4c6f40fc
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/debian/0001-testsuite-ignore-elflint.patch
@@ -0,0 +1,57 @@
+From fe7613a3b9f2443cc11917826348d4521f267c96 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 29 Jun 2018 15:48:33 +0800
+Subject: [PATCH] testsuite ignore elflint
+
+On many architectures this test fails because binaries/libs produced by
+binutils don't pass elflint. However elfutils shouldn't FTBFS because of this.
+
+So we run the tests on all archs to see what breaks, but if it breaks we ignore
+the result (exitcode 77 means: this test was skipped).
+
+Upstream-Status: Pending [from debian]
+testsuite-ignore-elflint.diff and rebase to 0.172
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tests/run-elflint-self.sh | 2 +-
+ tests/test-subr.sh | 15 +++++++++++++++
+ 2 files changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/tests/run-elflint-self.sh b/tests/run-elflint-self.sh
+index 58fa7d0..85d21a5 100755
+--- a/tests/run-elflint-self.sh
++++ b/tests/run-elflint-self.sh
+@@ -18,5 +18,5 @@
+
+ . $srcdir/test-subr.sh
+
+-testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
++testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld
+ testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld
+diff --git a/tests/test-subr.sh b/tests/test-subr.sh
+index 09f428d..26f61f1 100644
+--- a/tests/test-subr.sh
++++ b/tests/test-subr.sh
+@@ -201,3 +201,18 @@ testrun_on_self_quiet()
+ # Only exit if something failed
+ if test $exit_status != 0; then exit $exit_status; fi
+ }
++
++# Same as testrun_on_self(), but skip on failure.
++testrun_on_self_skip()
++{
++ exit_status=0
++
++ for file in $self_test_files; do
++ testrun $* $file \
++ || { echo "*** failure in $* $file"; exit_status=77; }
++ done
++
++ # Only exit if something failed
++ if test $exit_status != 0; then exit $exit_status; fi
++}
++
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
index b17498f5f..4bdb1ff3c 100644
--- a/poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
@@ -1,12 +1,12 @@
+Upstream-Status: Pending [from debian]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
From fdaab18a65ed2529656baa64cb6169f34d7e507b Mon Sep 17 00:00:00 2001
From: James Cowgill <james410@cowgill.org.uk>
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 <james410@cowgill.org.uk>
-
-Upstream-Status: Backport [from debian]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
backends/mips_retval.c | 104 ++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 94 insertions(+), 10 deletions(-)
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch b/poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch
index 2a5f8628d..d27ce6dc9 100644
--- a/poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch
@@ -1,3 +1,6 @@
+Upstream-Status: Pending [from debian]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
From 59d4b8c48e5040af7e02b34eb26ea602ec82a38e Mon Sep 17 00:00:00 2001
From: James Cowgill <james410@cowgill.org.uk>
Date: Mon, 5 Jan 2015 15:17:02 +0000
@@ -12,9 +15,6 @@ 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 <james410@cowgill.org.uk>
-
-Upstream-Status: Backport [from debian]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
libelf/gelf_getrel.c | 25 +++++++++++++++++++++++--
libelf/gelf_getrela.c | 25 +++++++++++++++++++++++--
@@ -203,7 +203,7 @@ 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
+@@ -598,6 +598,23 @@ handle_elf (int fd, Elf *elf, const char
goto fail;
}
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff b/poky/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff
new file mode 100644
index 000000000..55513eedd
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff
@@ -0,0 +1,14 @@
+Upstream-Status: Pending [from debian]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+--- elfutils-0.165.orig/tests/run-strip-strmerge.sh
++++ elfutils-0.165/tests/run-strip-strmerge.sh
+@@ -30,7 +30,7 @@ remerged=remerged.elf
+ tempfiles $merged $stripped $debugfile $remerged
+
+ echo elflint $input
+-testrun ${abs_top_builddir}/src/elflint --gnu $input
++testrun_on_self_skip ${abs_top_builddir}/src/elflint --gnu $input
+ echo elfstrmerge
+ testrun ${abs_top_builddir}/tests/elfstrmerge -o $merged $input
+ echo elflint $merged
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch b/poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch
deleted file mode 100644
index 790930cf3..000000000
--- a/poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From: Kurt Roeckx <kurt@roeckx.be>
-Subject: Make readelf -w output debug information on mips
-Bug-Debian: http://bugs.debian.org/662041
-Forwarded: not-needed
-
-Upstreams wants a change where this is handled by a hook that needs
-to be filled in by the backend for the arch.
-
-Upstream-Status: Backport [from debian]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
-Index: b/src/readelf.c
-===================================================================
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -8343,7 +8343,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *
- GElf_Shdr shdr_mem;
- GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
-
-- if (shdr != NULL && shdr->sh_type == SHT_PROGBITS)
-+ if (shdr != NULL && (
-+ (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF)))
- {
- static const struct
- {