From 3c07e2507696ddca226628142a7e3ce2d59a1195 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 8 Sep 2020 15:12:34 +0200 Subject: [PATCH] 0.181-1 - Upgrade to upstream 0.181 --- .gitignore | 1 + elfutils-0.180-mhd-result.patch | 67 ---------------------------- elfutils-0.180-shf-compressed.patch | 68 ----------------------------- elfutils.spec | 22 +++++++--- sources | 2 +- 5 files changed, 18 insertions(+), 142 deletions(-) delete mode 100644 elfutils-0.180-mhd-result.patch delete mode 100644 elfutils-0.180-shf-compressed.patch diff --git a/.gitignore b/.gitignore index d198cb4..f7d1f6e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /elfutils-0.178.tar.bz2 /elfutils-0.179.tar.bz2 /elfutils-0.180.tar.bz2 +/elfutils-0.181.tar.bz2 diff --git a/elfutils-0.180-mhd-result.patch b/elfutils-0.180-mhd-result.patch deleted file mode 100644 index 3a67a93..0000000 --- a/elfutils-0.180-mhd-result.patch +++ /dev/null @@ -1,67 +0,0 @@ -commit acb453851c9e6c46531b70fda7396885c0e7e1db -Author: Frank Ch. Eigler -Date: Thu Jul 2 14:52:48 2020 +0000 - - PR26195: adapt debuginfod to API change in libmicrohttpd-0.9.71 - - To make our code build with -Werror as well as against older libmicrohttpd, - we must conditionalize the data type (int vs. enum) returned by callbacks - and some mhd functions. - - Signed-off-by: Frank Ch. Eigler - -diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx -index 76f1fa52..56210302 100644 ---- a/debuginfod/debuginfod.cxx -+++ b/debuginfod/debuginfod.cxx -@@ -92,6 +92,14 @@ using namespace std; - #include - - #include -+ -+#if MHD_VERSION >= 0x00097002 -+// libmicrohttpd 0.9.71 broke API -+#define MHD_RESULT enum MHD_Result -+#else -+#define MHD_RESULT int -+#endif -+ - #include - #include - #include -@@ -519,12 +527,12 @@ struct reportable_exception - - void report(ostream& o) const; // defined under obatched() class below - -- int mhd_send_response(MHD_Connection* c) const { -+ MHD_RESULT mhd_send_response(MHD_Connection* c) const { - MHD_Response* r = MHD_create_response_from_buffer (message.size(), - (void*) message.c_str(), - MHD_RESPMEM_MUST_COPY); - MHD_add_response_header (r, "Content-Type", "text/plain"); -- int rc = MHD_queue_response (c, code, r); -+ MHD_RESULT rc = MHD_queue_response (c, code, r); - MHD_destroy_response (r); - return rc; - } -@@ -1723,7 +1731,7 @@ handle_metrics (off_t* size) - - - /* libmicrohttpd callback */ --static int -+static MHD_RESULT - handler_cb (void * /*cls*/, - struct MHD_Connection *connection, - const char *url, -@@ -1736,7 +1744,11 @@ handler_cb (void * /*cls*/, - struct MHD_Response *r = NULL; - string url_copy = url; - -+#if MHD_VERSION >= 0x00097002 -+ enum MHD_Result rc; -+#else - int rc = MHD_NO; // mhd -+#endif - int http_code = 500; - off_t http_size = -1; - struct timeval tv_start, tv_end; diff --git a/elfutils-0.180-shf-compressed.patch b/elfutils-0.180-shf-compressed.patch deleted file mode 100644 index 1a91d98..0000000 --- a/elfutils-0.180-shf-compressed.patch +++ /dev/null @@ -1,68 +0,0 @@ -commit 55c5c9a568ed707bcea1388bf3a525212d8cf4b8 -Author: Mark Wielaard -Date: Wed Aug 19 23:41:24 2020 +0200 - - libelf: Fixup SHF_COMPRESSED sh_addralign in elf_update if necessary. - - In elf_getdata.c we have the following to compensate for possibly - bad sh_addralign values of compressed sections: - - /* Compressed data has a header, but then compressed data. - Make sure to set the alignment of the header explicitly, - don't trust the file alignment for the section, it is - often wrong. */ - if ((flags & SHF_COMPRESSED) != 0) - { - entsize = 1; - align = __libelf_type_align (elf->class, ELF_T_CHDR); - } - - Which makes sure the d_data alignment is correct for the Chdr struct - at the start of the compressed section. - - But this means that if a user just reads such a compressed section - without changing it, and then tries to write it out again using - elf_update they get an error message about d_align and sh_addralign - being out of sync. - - We already correct obviously incorrect sh_entsize fields. - Do the same for the sh_addralign field of a SHF_COMPRESSED section. - - Signed-off-by: Mark Wielaard - -diff --git a/libelf/ChangeLog b/libelf/ChangeLog -index 8f6d2d2d..77044c1c 100644 ---- a/libelf/ChangeLog -+++ b/libelf/ChangeLog -@@ -1,3 +1,8 @@ -+2020-08-19 Mark Wielaard -+ -+ * elf32_updatenull.c (updatenull_wrlock): Fixup the sh_addralign -+ of an SHF_COMPRESSED section if necessary. -+ - 2020-06-04 Mark Wielaard - - * elf.h: Update from glibc. -diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c -index 5f3cdbf6..d0d4d1eb 100644 ---- a/libelf/elf32_updatenull.c -+++ b/libelf/elf32_updatenull.c -@@ -267,6 +267,18 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) - update_if_changed (shdr->sh_entsize, sh_entsize, - scn->shdr_flags); - -+ /* Likewise for the alignment of a compressed section. -+ For a SHF_COMPRESSED section set the correct -+ sh_addralign value, which must match the d_align of -+ the data (see __libelf_set_rawdata in elf_getdata.c). */ -+ if ((shdr->sh_flags & SHF_COMPRESSED) != 0) -+ { -+ sh_align = __libelf_type_align (ELFW(ELFCLASS,LIBELFBITS), -+ ELF_T_CHDR); -+ update_if_changed (shdr->sh_addralign, sh_align, -+ scn->shdr_flags); -+ } -+ - if (scn->data_read == 0 - && __libelf_set_rawdata_wrlock (scn) != 0) - /* Something went wrong. The error value is already set. */ diff --git a/elfutils.spec b/elfutils.spec index 18f6085..ac8c4e2 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,6 +1,6 @@ Name: elfutils -Version: 0.180 -%global baserelease 7 +Version: 0.181 +%global baserelease 1 Release: %{baserelease}%{?dist} URL: http://elfutils.org/ %global source_url ftp://sourceware.org/pub/elfutils/%{version}/ @@ -55,8 +55,6 @@ BuildRequires: curl %endif # Patches -Patch1: elfutils-0.180-mhd-result.patch -Patch2: elfutils-0.180-shf-compressed.patch %description Elfutils is a collection of utilities, including stack (to show @@ -225,8 +223,6 @@ such servers to download those files on demand. %setup -q # Apply patches -%patch1 -p1 -b .mhd_result -%patch2 -p1 -b .shf_compressed # In case the above patches added any new test scripts, make sure they # are executable. @@ -407,6 +403,20 @@ exit 0 %systemd_postun_with_restart debuginfod.service %changelog +* Tue Sep 8 2020 Mark Wielaard - 0.181-1 +- Upgrade to upstream 0.181 + - libelf: elf_update now compensates (fixes up) a bad sh_addralign + for SHF_COMPRESSED sections. + - libdebuginfod: configure now takes --enable-libdebuginfod=dummy or + --disable-libdebuginfod for bootstrapping. + DEBUGINFOD_URLS now accepts "scheme-free" urls + (guessing at what the user meant, either http:// or file://) + - readelf, elflint: Handle aarch64 bti, pac bits in dynamic table and + gnu property notes. + - libdw, readelf: Recognize DW_CFA_AARCH64_negate_ra_state. Allows + unwinding on arm64 for code that is compiled for PAC + (Pointer Authentication Code) as long as it isn't enabled. + * Tue Aug 25 2020 Mark Wielaard - 0.180-7 - Add elfutils-0.180-shf-compressed.patch diff --git a/sources b/sources index 186b1cd..b0e26f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (elfutils-0.180.tar.bz2) = 62e96035ccfe8928baca2285decbe8b8703a2daa956df81ece18fecf643272fb68955806b3e807a514141a7a9bf44520bf09461672aa580bd6807485fb604d25 +SHA512 (elfutils-0.181.tar.bz2) = d565541d5817f409dc89ebb1ee593366f69c371a1531308eeb67ff934b14a0fab0c9009fd7c23240efbaa1b4e04edac5c425e47d80e3e66ba03dcaf000afea36