summaryrefslogtreecommitdiff
path: root/package/libs/elfutils
diff options
context:
space:
mode:
Diffstat (limited to 'package/libs/elfutils')
-rw-r--r--package/libs/elfutils/Makefile8
-rw-r--r--package/libs/elfutils/patches/004-memcpy_def.patch14
-rw-r--r--package/libs/elfutils/patches/006-libdw_LIBS.patch2
-rw-r--r--package/libs/elfutils/patches/007-fix_TEMP_FAILURE_RETRY.patch92
-rw-r--r--package/libs/elfutils/patches/100-musl-compat.patch281
-rw-r--r--package/libs/elfutils/patches/101-no-fts.patch4
6 files changed, 183 insertions, 218 deletions
diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
index c7dfa51..0645d4e 100644
--- a/package/libs/elfutils/Makefile
+++ b/package/libs/elfutils/Makefile
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=elfutils
-PKG_VERSION:=0.167
+PKG_VERSION:=0.168
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/$(PKG_NAME)/$(PKG_VERSION)
-PKG_HASH:=3f300087c42b6f35591163b48246b4098ce39c4c6f5d55a83023c903c5776553
+PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
+PKG_HASH:=b88d07893ba1373c7dd69a7855974706d05377766568a7d9002706d5de72c276
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
@@ -68,6 +68,8 @@ endif
CONFIGURE_ARGS += \
--without-lzma
+TARGET_CFLAGS += -D_GNU_SOURCE
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
diff --git a/package/libs/elfutils/patches/004-memcpy_def.patch b/package/libs/elfutils/patches/004-memcpy_def.patch
deleted file mode 100644
index 3731592..0000000
--- a/package/libs/elfutils/patches/004-memcpy_def.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/libelf/libelf.h
-+++ b/libelf/libelf.h
-@@ -108,6 +108,11 @@ typedef struct
- size_t d_align; /* Alignment in section. */
- } Elf_Data;
-
-+#ifndef _LIBC
-+#ifndef __mempcpy
-+#define __mempcpy mempcpy
-+#endif
-+#endif
-
- /* Commands for `...'. */
- typedef enum
diff --git a/package/libs/elfutils/patches/006-libdw_LIBS.patch b/package/libs/elfutils/patches/006-libdw_LIBS.patch
index 80c20ad..59967e1 100644
--- a/package/libs/elfutils/patches/006-libdw_LIBS.patch
+++ b/package/libs/elfutils/patches/006-libdw_LIBS.patch
@@ -1,6 +1,6 @@
--- a/libdw/Makefile.in
+++ b/libdw/Makefile.in
-@@ -1002,7 +1002,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
+@@ -1005,7 +1005,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
-Wl,--version-script,$<,--no-undefined \
-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
diff --git a/package/libs/elfutils/patches/007-fix_TEMP_FAILURE_RETRY.patch b/package/libs/elfutils/patches/007-fix_TEMP_FAILURE_RETRY.patch
new file mode 100644
index 0000000..2a4c5c0
--- /dev/null
+++ b/package/libs/elfutils/patches/007-fix_TEMP_FAILURE_RETRY.patch
@@ -0,0 +1,92 @@
+From b853c091231a56cc36135323d2668775a3d3c435 Mon Sep 17 00:00:00 2001
+From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
+Date: Thu, 29 Dec 2016 20:51:41 -0200
+Subject: [PATCH] Fix TEMP_FAILURE_RETRY definition when not defined
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=21001
+
+Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
+---
+ ChangeLog | 4 ++++
+ lib/crc32_file.c | 1 +
+ lib/system.h | 2 +-
+ libdwfl/dwfl_build_id_find_elf.c | 1 +
+ libdwfl/dwfl_module_getdwarf.c | 1 +
+ libdwfl/libdwfl_crc32_file.c | 1 -
+ 6 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index bb2ec10..77a7db8 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,7 @@
++2016-12-29 Luiz Angelo Daros de Luca <luizluca@gmail.com>
++
++ * Fix TEMP_FAILURE_RETRY definition when not defined
++
+ 2016-12-27 Mark Wielaard <mark@klomp.org>
+
+ * configure.ac: Set version to 0.168.
+diff --git a/lib/crc32_file.c b/lib/crc32_file.c
+index a8434d4..57e4298 100644
+--- a/lib/crc32_file.c
++++ b/lib/crc32_file.c
+@@ -35,6 +35,7 @@
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
++#include "system.h"
+
+ int
+ crc32_file (int fd, uint32_t *resp)
+diff --git a/lib/system.h b/lib/system.h
+index ccd99d6..dde7c4a 100644
+--- a/lib/system.h
++++ b/lib/system.h
+@@ -81,7 +81,7 @@
+ do \
+ __res = expression; \
+ while (__res == -1 && errno == EINTR); \
+- __res; });
++ __res; })
+ #endif
+
+ static inline ssize_t __attribute__ ((unused))
+diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c
+index 903e193..d4737c9 100644
+--- a/libdwfl/dwfl_build_id_find_elf.c
++++ b/libdwfl/dwfl_build_id_find_elf.c
+@@ -30,6 +30,7 @@
+ #include <inttypes.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#include "system.h"
+
+
+ int
+diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c
+index 0e8810b..46caece 100644
+--- a/libdwfl/dwfl_module_getdwarf.c
++++ b/libdwfl/dwfl_module_getdwarf.c
+@@ -33,6 +33,7 @@
+ #include <unistd.h>
+ #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */
+ #include "../libelf/libelfP.h"
++#include "system.h"
+
+ static inline Dwfl_Error
+ open_elf_file (Elf **elf, int *fd, char **name)
+diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c
+index 6b6b7d3..f849128 100644
+--- a/libdwfl/libdwfl_crc32_file.c
++++ b/libdwfl/libdwfl_crc32_file.c
+@@ -31,6 +31,5 @@
+
+ #define crc32_file attribute_hidden __libdwfl_crc32_file
+ #define crc32 __libdwfl_crc32
+-#define LIB_SYSTEM_H 1
+ #include <libdwflP.h>
+ #include "../lib/crc32_file.c"
+--
+2.9.3
+
diff --git a/package/libs/elfutils/patches/100-musl-compat.patch b/package/libs/elfutils/patches/100-musl-compat.patch
index f345c3a..2b71b97 100644
--- a/package/libs/elfutils/patches/100-musl-compat.patch
+++ b/package/libs/elfutils/patches/100-musl-compat.patch
@@ -1,619 +1,567 @@
+https://sourceware.org/bugzilla/show_bug.cgi?id=21002
+
--- a/lib/system.h
+++ b/lib/system.h
-@@ -68,6 +68,16 @@ extern int crc32_file (int fd, uint32_t
-
- #define gettext_noop(Str) Str
+@@ -140,6 +140,19 @@ pread_retry (int fd, void *buf, size_t l
+ return recvd;
+ }
-+#ifndef TEMP_FAILURE_RETRY
-+#define TEMP_FAILURE_RETRY(expression) \
-+ (__extension__ \
-+ ({ long int __result; \
-+ do __result = (long int) (expression); \
-+ while (__result == -1L && errno == EINTR); \
-+ __result; }))
++#ifdef HAVE_ERROR_H
++#include "error.h"
++#else
++#include "err.h"
++#define error(status, errno, ...) \
++ fflush(stdout); \
++ warn(__VA_ARGS__); \
++ if (status) exit(status)
+#endif
+
-+#define error(status, errno, ...) err(status, __VA_ARGS__)
++#ifndef __GLIBC__
++#define canonicalize_file_name(name) realpath(name,NULL)
++#endif
- static inline ssize_t __attribute__ ((unused))
- pwrite_retry (int fd, const void *buf, size_t len, off_t off)
+ /* We need define two variables, argp_program_version_hook and
+ argp_program_bug_address, in all programs. argp.h declares these
--- a/lib/color.c
+++ b/lib/color.c
-@@ -32,7 +32,7 @@
+@@ -32,12 +32,12 @@
#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 "system.h"
+
+
+ /* Prototype for option handler. */
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
-@@ -30,7 +30,7 @@
+@@ -30,7 +30,6 @@
# include <config.h>
#endif
-#include <error.h>
-+#include <err.h>
#include <libintl.h>
#include <stddef.h>
#include <stdlib.h>
--- a/src/addr2line.c
+++ b/src/addr2line.c
-@@ -23,7 +23,7 @@
+@@ -23,7 +23,6 @@
#include <argp.h>
#include <assert.h>
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <inttypes.h>
#include <libdwfl.h>
--- a/src/ar.c
+++ b/src/ar.c
-@@ -22,7 +22,7 @@
+@@ -22,7 +22,6 @@
#include <argp.h>
#include <assert.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <libintl.h>
--- a/src/arlib2.c
+++ b/src/arlib2.c
-@@ -20,7 +20,7 @@
+@@ -20,7 +20,6 @@
# include <config.h>
#endif
-#include <error.h>
-+#include <err.h>
#include <libintl.h>
#include <limits.h>
#include <string.h>
--- a/src/arlib.c
+++ b/src/arlib.c
-@@ -21,7 +21,7 @@
+@@ -21,7 +21,6 @@
#endif
#include <assert.h>
-#include <error.h>
-+#include <err.h>
#include <gelf.h>
+ #include <inttypes.h>
#include <libintl.h>
- #include <stdio.h>
--- a/src/elfcmp.c
+++ b/src/elfcmp.c
-@@ -23,7 +23,7 @@
+@@ -23,7 +23,6 @@
#include <argp.h>
#include <assert.h>
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <locale.h>
#include <libintl.h>
--- a/src/elflint.c
+++ b/src/elflint.c
-@@ -24,7 +24,7 @@
+@@ -24,7 +24,6 @@
#include <assert.h>
#include <byteswap.h>
#include <endian.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <inttypes.h>
--- a/src/findtextrel.c
+++ b/src/findtextrel.c
-@@ -23,7 +23,7 @@
+@@ -23,7 +23,6 @@
#include <argp.h>
#include <assert.h>
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <libdw.h>
--- a/src/nm.c
+++ b/src/nm.c
-@@ -26,7 +26,7 @@
+@@ -26,7 +26,6 @@
#include <ctype.h>
#include <dwarf.h>
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <inttypes.h>
--- a/src/objdump.c
+++ b/src/objdump.c
-@@ -21,7 +21,7 @@
+@@ -21,7 +21,6 @@
#endif
#include <argp.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <inttypes.h>
#include <libintl.h>
--- a/src/ranlib.c
+++ b/src/ranlib.c
-@@ -24,7 +24,7 @@
+@@ -24,7 +24,6 @@
#include <argp.h>
#include <assert.h>
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <libintl.h>
--- a/src/readelf.c
+++ b/src/readelf.c
-@@ -25,7 +25,7 @@
+@@ -25,7 +25,6 @@
#include <ctype.h>
#include <dwarf.h>
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <inttypes.h>
--- a/src/size.c
+++ b/src/size.c
-@@ -21,7 +21,7 @@
+@@ -21,7 +21,6 @@
#endif
#include <argp.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <inttypes.h>
--- a/src/stack.c
+++ b/src/stack.c
-@@ -18,7 +18,7 @@
+@@ -18,7 +18,6 @@
#include <config.h>
#include <assert.h>
#include <argp.h>
-#include <error.h>
-+#include <err.h>
#include <stdlib.h>
#include <inttypes.h>
#include <stdio.h>
--- a/src/strings.c
+++ b/src/strings.c
-@@ -25,7 +25,7 @@
+@@ -25,7 +25,6 @@
#include <ctype.h>
#include <endian.h>
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <inttypes.h>
--- a/src/strip.c
+++ b/src/strip.c
-@@ -24,7 +24,7 @@
+@@ -24,7 +24,6 @@
#include <assert.h>
#include <byteswap.h>
#include <endian.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <libelf.h>
--- a/src/unstrip.c
+++ b/src/unstrip.c
-@@ -31,7 +31,7 @@
+@@ -31,7 +31,6 @@
#include <argp.h>
#include <assert.h>
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <fnmatch.h>
#include <libintl.h>
--- a/tests/addrscopes.c
+++ b/tests/addrscopes.c
-@@ -25,7 +25,7 @@
+@@ -25,7 +25,6 @@
#include <stdio_ext.h>
#include <locale.h>
#include <stdlib.h>
-#include <error.h>
-+#include <err.h>
#include <string.h>
--- a/tests/allregs.c
+++ b/tests/allregs.c
-@@ -21,7 +21,7 @@
+@@ -21,7 +21,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <error.h>
-+#include <err.h>
#include <locale.h>
#include <argp.h>
#include <assert.h>
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
-@@ -24,7 +24,7 @@
+@@ -24,7 +24,6 @@
#include <dirent.h>
#include <stdlib.h>
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <unistd.h>
#include <dwarf.h>
#ifdef __linux__
--- a/tests/backtrace-data.c
+++ b/tests/backtrace-data.c
-@@ -27,7 +27,7 @@
+@@ -27,7 +27,6 @@
#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__)
--- a/tests/buildid.c
+++ b/tests/buildid.c
-@@ -23,7 +23,7 @@
+@@ -23,7 +23,6 @@
#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>
--- a/tests/debugaltlink.c
+++ b/tests/debugaltlink.c
-@@ -23,7 +23,7 @@
+@@ -23,7 +23,6 @@
#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>
--- a/tests/debuglink.c
+++ b/tests/debuglink.c
-@@ -21,7 +21,7 @@
+@@ -21,7 +21,6 @@
#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>
--- a/tests/dwfl-addr-sect.c
+++ b/tests/dwfl-addr-sect.c
-@@ -23,7 +23,7 @@
+@@ -23,7 +23,6 @@
#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)
--- a/tests/dwfl-bug-addr-overflow.c
+++ b/tests/dwfl-bug-addr-overflow.c
-@@ -20,7 +20,7 @@
+@@ -20,7 +20,6 @@
#include <inttypes.h>
#include <stdio.h>
#include <stdio_ext.h>
-#include <error.h>
-+#include <err.h>
#include <locale.h>
#include ELFUTILS_HEADER(dwfl)
--- a/tests/dwfl-bug-fd-leak.c
+++ b/tests/dwfl-bug-fd-leak.c
-@@ -24,7 +24,7 @@
+@@ -24,7 +24,6 @@
#include <dirent.h>
#include <stdlib.h>
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <unistd.h>
#include <dwarf.h>
--- a/tests/dwfl-bug-getmodules.c
+++ b/tests/dwfl-bug-getmodules.c
-@@ -18,7 +18,7 @@
+@@ -18,7 +18,6 @@
#include <config.h>
#include ELFUTILS_HEADER(dwfl)
-#include <error.h>
-+#include <err.h>
static const Dwfl_Callbacks callbacks =
{
--- a/tests/dwfllines.c
+++ b/tests/dwfllines.c
-@@ -27,7 +27,7 @@
+@@ -27,7 +27,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <error.h>
-+#include <err.h>
int
main (int argc, char *argv[])
--- a/tests/dwflmodtest.c
+++ b/tests/dwflmodtest.c
-@@ -23,7 +23,7 @@
+@@ -23,7 +23,6 @@
#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)
--- a/tests/dwfl-report-elf-align.c
+++ b/tests/dwfl-report-elf-align.c
-@@ -20,7 +20,7 @@
+@@ -20,7 +20,6 @@
#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>
--- a/tests/dwflsyms.c
+++ b/tests/dwflsyms.c
-@@ -25,7 +25,7 @@
+@@ -25,7 +25,6 @@
#include <stdio.h>
#include <stdio_ext.h>
#include <stdlib.h>
-#include <error.h>
-+#include <err.h>
#include <string.h>
static const char *
--- a/tests/early-offscn.c
+++ b/tests/early-offscn.c
-@@ -19,7 +19,7 @@
+@@ -19,7 +19,6 @@
#endif
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <stdio.h>
--- a/tests/ecp.c
+++ b/tests/ecp.c
-@@ -20,7 +20,7 @@
+@@ -20,7 +20,6 @@
#endif
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <stdlib.h>
--- a/tests/find-prologues.c
+++ b/tests/find-prologues.c
-@@ -25,7 +25,7 @@
+@@ -25,7 +25,6 @@
#include <stdio_ext.h>
#include <locale.h>
#include <stdlib.h>
-#include <error.h>
-+#include <err.h>
#include <string.h>
#include <fnmatch.h>
--- a/tests/funcretval.c
+++ b/tests/funcretval.c
-@@ -25,7 +25,7 @@
+@@ -25,7 +25,6 @@
#include <stdio_ext.h>
#include <locale.h>
#include <stdlib.h>
-#include <error.h>
-+#include <err.h>
#include <string.h>
#include <fnmatch.h>
--- a/tests/funcscopes.c
+++ b/tests/funcscopes.c
-@@ -25,7 +25,7 @@
+@@ -25,7 +25,6 @@
#include <stdio_ext.h>
#include <locale.h>
#include <stdlib.h>
-#include <error.h>
-+#include <err.h>
#include <string.h>
#include <fnmatch.h>
--- a/tests/line2addr.c
+++ b/tests/line2addr.c
-@@ -26,7 +26,7 @@
+@@ -26,7 +26,6 @@
#include <locale.h>
#include <stdlib.h>
#include <string.h>
-#include <error.h>
-+#include <err.h>
static void
--- a/tests/low_high_pc.c
+++ b/tests/low_high_pc.c
-@@ -25,7 +25,7 @@
+@@ -25,7 +25,6 @@
#include <stdio_ext.h>
#include <locale.h>
#include <stdlib.h>
-#include <error.h>
-+#include <err.h>
#include <string.h>
#include <fnmatch.h>
--- a/tests/md5-sha1-test.c
+++ b/tests/md5-sha1-test.c
-@@ -19,7 +19,7 @@
+@@ -19,7 +19,6 @@
#endif
#include <string.h>
-#include <error.h>
-+#include <err.h>
#include "md5.h"
#include "sha1.h"
--- a/tests/rdwrmmap.c
+++ b/tests/rdwrmmap.c
-@@ -19,7 +19,7 @@
+@@ -19,7 +19,6 @@
#endif
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
--- a/tests/saridx.c
+++ b/tests/saridx.c
-@@ -17,7 +17,7 @@
+@@ -17,7 +17,6 @@
#include <config.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <stdio.h>
--- a/tests/sectiondump.c
+++ b/tests/sectiondump.c
-@@ -18,7 +18,7 @@
+@@ -18,7 +18,6 @@
#include <config.h>
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <inttypes.h>
--- a/tests/varlocs.c
+++ b/tests/varlocs.c
-@@ -25,7 +25,7 @@
+@@ -25,7 +25,6 @@
#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>
---- a/libelf/libelf.h
-+++ b/libelf/libelf.h
-@@ -29,6 +29,7 @@
- #ifndef _LIBELF_H
- #define _LIBELF_H 1
-
-+#include <fcntl.h>
- #include <stdint.h>
- #include <sys/types.h>
-
--- a/libasm/asm_end.c
+++ b/libasm/asm_end.c
-@@ -32,7 +32,7 @@
+@@ -32,7 +32,6 @@
#endif
#include <assert.h>
-#include <error.h>
-+#include <err.h>
#include <libintl.h>
#include <stdio.h>
#include <stdlib.h>
--- a/libasm/asm_newscn.c
+++ b/libasm/asm_newscn.c
-@@ -32,7 +32,7 @@
+@@ -32,7 +32,6 @@
#endif
#include <assert.h>
-#include <error.h>
-+#include <err.h>
#include <libintl.h>
#include <stdlib.h>
#include <string.h>
--- a/libcpu/i386_gendis.c
+++ b/libcpu/i386_gendis.c
-@@ -31,7 +31,7 @@
+@@ -31,7 +31,6 @@
# include <config.h>
#endif
-#include <error.h>
-+#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
--- a/libcpu/i386_lex.c
+++ b/libcpu/i386_lex.c
-@@ -578,7 +578,7 @@ char *i386_text;
+@@ -592,7 +592,6 @@ char *i386_text;
#endif
#include <ctype.h>
-#include <error.h>
-+#include <err.h>
#include <libintl.h>
- #include <system.h>
+ #include <libeu.h>
--- a/libcpu/i386_lex.l
+++ b/libcpu/i386_lex.l
-@@ -31,7 +31,7 @@
+@@ -31,7 +31,6 @@
#endif
#include <ctype.h>
-#include <error.h>
-+#include <err.h>
#include <libintl.h>
- #include <system.h>
+ #include <libeu.h>
--- a/libcpu/i386_parse.c
+++ b/libcpu/i386_parse.c
-@@ -107,7 +107,7 @@
+@@ -107,7 +107,6 @@
#include <assert.h>
#include <ctype.h>
#include <errno.h>
-#include <error.h>
-+#include <err.h>
#include <inttypes.h>
#include <libintl.h>
#include <math.h>
--- a/libdw/libdw_alloc.c
+++ b/libdw/libdw_alloc.c
-@@ -31,7 +31,7 @@
+@@ -31,7 +31,6 @@
# include <config.h>
#endif
-#include <error.h>
-+#include <err.h>
#include <errno.h>
#include <stdlib.h>
- #include <sys/param.h>
-@@ -74,5 +74,5 @@ __attribute ((noreturn, visibility ("hid
+ #include "libdwP.h"
+@@ -74,5 +73,5 @@ __attribute ((noreturn, visibility ("hid
__libdw_oom (void)
{
while (1)
- error (EXIT_FAILURE, ENOMEM, "libdw");
-+ err (EXIT_FAILURE, "libdw: out of memory");
++ error (EXIT_FAILURE, errno, gettext ("cannot allocate memory"));
}
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
-@@ -32,7 +32,7 @@
+@@ -32,7 +32,6 @@
#include <assert.h>
#include <dlfcn.h>
-#include <error.h>
-+#include <err.h>
#include <libelfP.h>
#include <dwarf.h>
#include <stdlib.h>
@@ -637,66 +585,3 @@
case OTHER_ERROR (LIBELF):
return elf_errmsg (error & 0xffff);
case OTHER_ERROR (LIBDW):
---- a/libdwfl/libdwfl.h
-+++ b/libdwfl/libdwfl.h
-@@ -31,6 +31,27 @@
-
- #include "libdw.h"
- #include <stdio.h>
-+#include <unistd.h>
-+#include <alloca.h>
-+#include <string.h>
-+
-+#ifndef TEMP_FAILURE_RETRY
-+#define TEMP_FAILURE_RETRY(expression) \
-+ (__extension__ \
-+ ({ long int __result; \
-+ do __result = (long int) (expression); \
-+ while (__result == -1L && errno == EINTR); \
-+ __result; }))
-+#endif
-+
-+#ifndef strndupa
-+#define strndupa(s, n) \
-+ (__extension__ ({const char *__in = (s); \
-+ size_t __len = strnlen (__in, (n)) + 1; \
-+ char *__out = (char *) alloca (__len); \
-+ __out[__len-1] = '\0'; \
-+ (char *) memcpy (__out, __in, __len-1);}))
-+#endif
-
- /* Handle for a session using the library. */
- typedef struct Dwfl Dwfl;
---- a/libdwfl/find-debuginfo.c
-+++ b/libdwfl/find-debuginfo.c
-@@ -385,7 +385,7 @@ dwfl_standard_find_debuginfo (Dwfl_Modul
- /* If FILE_NAME is a symlink, the debug file might be associated
- with the symlink target name instead. */
-
-- char *canon = canonicalize_file_name (file_name);
-+ char *canon = realpath (file_name, NULL);
- if (canon != NULL && strcmp (file_name, canon))
- fd = find_debuginfo_in_path (mod, canon,
- debuglink_file, debuglink_crc,
---- a/libdwfl/dwfl_build_id_find_elf.c
-+++ b/libdwfl/dwfl_build_id_find_elf.c
-@@ -94,7 +94,7 @@ __libdwfl_open_by_build_id (Dwfl_Module
- {
- if (*file_name != NULL)
- free (*file_name);
-- *file_name = canonicalize_file_name (name);
-+ *file_name = realpath (name, NULL);
- if (*file_name == NULL)
- {
- *file_name = name;
---- a/libelf/elf_getarsym.c
-+++ b/libelf/elf_getarsym.c
-@@ -297,7 +297,7 @@ elf_getarsym (Elf *elf, size_t *ptr)
- arsym[cnt].as_off = (*u32)[cnt];
-
- arsym[cnt].as_hash = _dl_elf_hash (str_data);
-- str_data = rawmemchr (str_data, '\0') + 1;
-+ str_data = memchr (str_data, '\0', SIZE_MAX) + 1;
- }
-
- /* At the end a special entry. */
diff --git a/package/libs/elfutils/patches/101-no-fts.patch b/package/libs/elfutils/patches/101-no-fts.patch
index 124563c..e6a6729 100644
--- a/package/libs/elfutils/patches/101-no-fts.patch
+++ b/package/libs/elfutils/patches/101-no-fts.patch
@@ -90,7 +90,7 @@
dwfl_addrmodule.$(OBJEXT) dwfl_addrdwarf.$(OBJEXT) \
cu.$(OBJEXT) dwfl_module_nextcu.$(OBJEXT) \
dwfl_nextcu.$(OBJEXT) dwfl_cumodule.$(OBJEXT) \
-@@ -432,7 +432,7 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en
+@@ -434,7 +434,7 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en
dwfl_getmodules.c dwfl_getdwarf.c dwfl_module_getdwarf.c \
dwfl_module_getelf.c dwfl_validate_address.c argp-std.c \
find-debuginfo.c dwfl_build_id_find_elf.c \
@@ -99,7 +99,7 @@
linux-proc-maps.c dwfl_addrmodule.c dwfl_addrdwarf.c cu.c \
dwfl_module_nextcu.c dwfl_nextcu.c dwfl_cumodule.c \
dwfl_module_addrdie.c dwfl_addrdie.c lines.c dwfl_lineinfo.c \
-@@ -569,7 +569,6 @@ distclean-compile:
+@@ -571,7 +571,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lines.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link_map.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux-core-attach.Po@am__quote@