tools/elfutils: update to version 0.191
authorFelix Fietkau <nbd@nbd.name>
Mon, 15 Apr 2024 10:22:01 +0000 (12:22 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 19 Apr 2024 16:02:50 +0000 (18:02 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
tools/elfutils/Makefile
tools/elfutils/patches/007-fix-missing-typedef.patch [new file with mode: 0644]
tools/elfutils/patches/100-portability.patch

index a70182724857a34397364d6ae0737f2bf1ea7456..783d2ae9718d285272b280607b15ee025d6a4a53 100644 (file)
@@ -3,12 +3,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=elfutils
-PKG_VERSION:=0.189
+PKG_VERSION:=0.191
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
-PKG_HASH:=39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8
+PKG_HASH:=df76db71366d1d708365fc7a6c60ca48398f14367eb2b8954efc8897147ad871
 
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
diff --git a/tools/elfutils/patches/007-fix-missing-typedef.patch b/tools/elfutils/patches/007-fix-missing-typedef.patch
new file mode 100644 (file)
index 0000000..cfac17a
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/libelf/libelf.h
++++ b/libelf/libelf.h
+@@ -73,15 +73,15 @@
+  /* So RELR defines/typedefs can be used even with an old system elf.h.  */
+  #define SHT_RELR       19      /* RELR relative relocations */
+- /* RELR relocation table entry */
+- typedef Elf32_Word     Elf32_Relr;
+- typedef Elf64_Xword    Elf64_Relr;
+-
+  #define DT_RELRSZ      35      /* Total size of RELR relative relocations */
+  #define DT_RELR        36      /* Address of RELR relative relocations */
+  #define DT_RELRENT     37      /* Size of one RELR relative relocaction */
+ #endif
++/* RELR relocation table entry */
++typedef Elf32_Word     Elf32_Relr;
++typedef Elf64_Xword    Elf64_Relr;
++
+ #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
+ # define __nonnull_attribute__(...) __attribute__ ((__nonnull__ (__VA_ARGS__)))
+ # define __deprecated_attribute__ __attribute__ ((__deprecated__))
index 0d650549eec39064ee59ee2dc7905b0233b9ffb5..87f97c2bda9b2327068d0dfd7c62c284fff4dca4 100644 (file)
@@ -2,7 +2,7 @@
 +++ b/configure.ac
 @@ -20,6 +20,7 @@ dnl  You should have received a copy of
  dnl  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- AC_INIT([elfutils],[0.189],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/])
+ AC_INIT([elfutils],[0.191],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/])
  
 +AC_CONFIG_MACRO_DIRS([m4])
  dnl Workaround for older autoconf < 2.64
@@ -15,7 +15,7 @@
 -AC_CONFIG_FILES([config/Makefile])
 +AC_CONFIG_FILES([config/Makefile libgnu/Makefile])
  
- AC_COPYRIGHT([Copyright (C) 1996-2023 The elfutils developers.])
+ AC_COPYRIGHT([Copyright (C) 1996-2024 The elfutils developers.])
 -AC_PREREQ(2.63)                       dnl Minimum Autoconf version required.
 +AC_PREREQ(2.64)                       dnl Minimum Autoconf version required.
  
@@ -99,7 +99,7 @@
 -        libasm debuginfod src po doc tests
 +SUBDIRS = libgnu config lib libelf libcpu backends libebl libdwelf libdwfl libdw
  
- EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
+ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING SECURITY \
 -           COPYING COPYING-GPLV2 COPYING-LGPLV3
 +           COPYING COPYING-GPLV2 COPYING-LGPLV3 \
 +               m4/gnulib-cache.m4
  write_file (Elf *elf, int64_t size, int change_bo, size_t shnum)
 --- a/lib/eu-config.h
 +++ b/lib/eu-config.h
-@@ -52,14 +52,18 @@
- # define rwlock_unlock(lock) ((void) (lock))
+@@ -59,14 +59,18 @@
+ # define once(once_control, init_routine)     init_routine()
  #endif        /* USE_LOCKS */
  
 -#include <libintl.h>
  
  #ifdef __i386__
  # define internal_function __attribute__ ((regparm (3), stdcall))
-@@ -70,12 +74,7 @@
+@@ -77,12 +81,7 @@
  #define internal_strong_alias(name, aliasname) \
    extern __typeof (name) aliasname __attribute__ ((alias (#name))) internal_function;
  
  
  #ifdef HAVE_GCC_STRUCT
  #define attribute_packed \
-@@ -159,7 +158,7 @@ asm (".section predict_data, \"aw\"; .pr
+@@ -166,7 +165,7 @@ asm (".section predict_data, \"aw\"; .pr
  #endif
  
  /* Avoid PLT entries.  */
  
  modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
          m68k bpf riscv csky loongarch arc
-@@ -100,17 +100,13 @@ loongarch_SRCS = loongarch_init.c loonga
+@@ -102,17 +102,13 @@ loongarch_SRCS = loongarch_init.c loonga
  
  arc_SRCS = arc_init.c arc_symbol.c
  
 +++ b/src/Makefile.am
 @@ -29,9 +29,9 @@ bin_PROGRAMS = readelf nm size strip elf
               elfcmp objdump ranlib strings ar unstrip stack elfcompress \
-              elfclassify
+              elfclassify srcfiles
  
 -noinst_LIBRARIES = libar.a
 +noinst_LTLIBRARIES = libar.la
  
  EXTRA_DIST = arlib.h debugpred.h
  
-@@ -39,17 +39,11 @@ bin_SCRIPTS = make-debug-archive
+@@ -39,27 +39,16 @@ bin_SCRIPTS = make-debug-archive
  EXTRA_DIST += make-debug-archive.in
  CLEANFILES += make-debug-archive
  
 -if BUILD_STATIC
 -libasm = ../libasm/libasm.a
 -libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread
--libelf = ../libelf/libelf.a -lz
+-libelf = ../libelf/libelf.a -lz $(zstd_LIBS)
++libasm = ../libasm/libasm.la
++libdw = ../libdw/libdw.la -lz $(zip_LIBS) $(libelf) -ldl -lpthread
++libelf = ../libelf/libelf.la
++libebl = ../libebl/libebl.la ../backends/libebl_backends.la ../libcpu/libcpu.la
++libeu = ../lib/libeu.la
+ if LIBDEBUGINFOD
+-libdebuginfod = ../debuginfod/libdebuginfod.a -lpthread $(libcurl_LIBS)
++libdebuginfod = ../debuginfod/libdebuginfod.la
+ else
+ libdebuginfod =
+ endif
 -else
 -libasm = ../libasm/libasm.so
 -libdw = ../libdw/libdw.so
 -libelf = ../libelf/libelf.so
+-if LIBDEBUGINFOD
+-libdebuginfod = ../debuginfod/libdebuginfod.so
+-else
+-libdebuginfod =
+-endif
 -endif
 -libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
 -libeu = ../lib/libeu.a
-+libasm = ../libasm/libasm.la
-+libdw = ../libdw/libdw.la -lz $(zip_LIBS) $(libelf) -ldl -lpthread
-+libelf = ../libelf/libelf.la
-+libebl = ../libebl/libebl.la ../backends/libebl_backends.la ../libcpu/libcpu.la
-+libeu = ../lib/libeu.la
  
  if DEMANGLE
  demanglelib = -lstdc++
-@@ -77,9 +71,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $
+@@ -87,9 +76,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $
  addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
  elfcmp_LDADD = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
  objdump_LDADD  = $(libasm) $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
  unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
  stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(demanglelib)
  elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -662,17 +662,11 @@ installcheck-local:
-               TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
-               LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
--if BUILD_STATIC
--libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
--libelf = ../libelf/libelf.a -lz
--libasm = ../libasm/libasm.a
--else
--libdw = ../libdw/libdw.so
--libelf = ../libelf/libelf.so
--libasm = ../libasm/libasm.so
--endif
--libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
--libeu = ../lib/libeu.a
-+libdw = ../libdw/libdw.la -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
-+libelf = ../libelf/libelf.la
-+libasm = ../libasm/libasm.la
-+libebl = ../libebl/libebl.la ../backends/libebl_backends.la ../libcpu/libcpu.la
-+libeu = ../lib/libeu.la
- arextract_LDADD = $(libelf)
- arsymtest_LDADD = $(libelf)
 --- a/libcpu/Makefile.am
 +++ b/libcpu/Makefile.am
 @@ -38,19 +38,16 @@ LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAG
  Cflags: -I${includedir}
  
  Requires.private: zlib @LIBZSTD@
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -689,17 +689,11 @@ installcheck-local:
+               TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
+               LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
+-if BUILD_STATIC
+-libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
+-libelf = ../libelf/libelf.a -lz $(zstd_LIBS)
+-libasm = ../libasm/libasm.a
+-else
+-libdw = ../libdw/libdw.so
+-libelf = ../libelf/libelf.so
+-libasm = ../libasm/libasm.so
+-endif
+-libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
+-libeu = ../lib/libeu.a
++libdw = ../libdw/libdw.la -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
++libelf = ../libelf/libelf.la
++libasm = ../libasm/libasm.la
++libebl = ../libebl/libebl.la ../backends/libebl_backends.la ../libcpu/libcpu.la
++libeu = ../lib/libeu.la
+ arextract_LDADD = $(libelf)
+ arsymtest_LDADD = $(libelf)
+--- a/libelf/elf_end.c
++++ b/libelf/elf_end.c
+@@ -37,6 +37,7 @@
+ #include <stddef.h>
+ #include <stdlib.h>
++#include <libeu.h>
+ #include "libelfP.h"
+--- a/lib/system.h
++++ b/lib/system.h
+@@ -223,6 +223,5 @@ xbasename(const char *s)
+   const char *p = strrchr(s, '/');
+   return p ? p+1 : s;
+ }
+-#pragma GCC poison basename
+ #endif /* system.h */