forked from pool/elfutils
Updating link to change in openSUSE:Factory/elfutils revision 106
OBS-URL: https://build.opensuse.org/package/show/Base:System/elfutils?expand=0&rev=e4b35ae72d069e5ec175e8d1871c4831
This commit is contained in:
parent
384395963b
commit
754a4391b4
@ -1,130 +0,0 @@
|
|||||||
From 04b83727c0a48e8d6f4c7e633886439cc1e8a7b3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andreas Schwab <schwab@suse.de>
|
|
||||||
Date: Mon, 8 Aug 2022 13:35:20 +0200
|
|
||||||
Subject: [PATCH] backends: Add RISC-V object attribute printing
|
|
||||||
|
|
||||||
Signed-off-by: Andreas Schwab <schwab@suse.de>
|
|
||||||
---
|
|
||||||
backends/ChangeLog | 6 ++++
|
|
||||||
backends/Makefile.am | 3 +-
|
|
||||||
backends/riscv_attrs.c | 80 ++++++++++++++++++++++++++++++++++++++++++
|
|
||||||
backends/riscv_init.c | 2 ++
|
|
||||||
4 files changed, 90 insertions(+), 1 deletion(-)
|
|
||||||
create mode 100644 backends/riscv_attrs.c
|
|
||||||
|
|
||||||
diff --git a/backends/Makefile.am b/backends/Makefile.am
|
|
||||||
index 9566377f..1863f66a 100644
|
|
||||||
--- a/backends/Makefile.am
|
|
||||||
+++ b/backends/Makefile.am
|
|
||||||
@@ -91,7 +91,8 @@ m68k_corenote_no_Wpacked_not_aligned = yes
|
|
||||||
bpf_SRCS = bpf_init.c bpf_regs.c bpf_symbol.c
|
|
||||||
|
|
||||||
riscv_SRCS = riscv_init.c riscv_symbol.c riscv_cfi.c riscv_regs.c \
|
|
||||||
- riscv_initreg.c riscv_corenote.c riscv64_corenote.c riscv_retval.c
|
|
||||||
+ riscv_initreg.c riscv_corenote.c riscv64_corenote.c \
|
|
||||||
+ riscv_retval.c riscv_attrs.c
|
|
||||||
|
|
||||||
csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \
|
|
||||||
csky_regs.c csky_initreg.c csky_corenote.c
|
|
||||||
diff --git a/backends/riscv_attrs.c b/backends/riscv_attrs.c
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..d74aac5c
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/backends/riscv_attrs.c
|
|
||||||
@@ -0,0 +1,80 @@
|
|
||||||
+/* RISC-V ABI-specified defaults for DWARF CFI.
|
|
||||||
+ This file is part of elfutils.
|
|
||||||
+
|
|
||||||
+ This file is free software; you can redistribute it and/or modify
|
|
||||||
+ it under the terms of either
|
|
||||||
+
|
|
||||||
+ * the GNU Lesser General Public License as published by the Free
|
|
||||||
+ Software Foundation; either version 3 of the License, or (at
|
|
||||||
+ your option) any later version
|
|
||||||
+
|
|
||||||
+ or
|
|
||||||
+
|
|
||||||
+ * the GNU General Public License as published by the Free
|
|
||||||
+ Software Foundation; either version 2 of the License, or (at
|
|
||||||
+ your option) any later version
|
|
||||||
+
|
|
||||||
+ or both in parallel, as here.
|
|
||||||
+
|
|
||||||
+ elfutils is distributed in the hope that it will be useful, but
|
|
||||||
+ WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
+ General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received copies of the GNU General Public License and
|
|
||||||
+ the GNU Lesser General Public License along with this program. If
|
|
||||||
+ not, see <http://www.gnu.org/licenses/>. */
|
|
||||||
+
|
|
||||||
+#ifdef HAVE_CONFIG_H
|
|
||||||
+# include <config.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#include <string.h>
|
|
||||||
+#include <dwarf.h>
|
|
||||||
+
|
|
||||||
+#define BACKEND riscv_
|
|
||||||
+#include "libebl_CPU.h"
|
|
||||||
+
|
|
||||||
+#define KNOWN_VALUES(...) do \
|
|
||||||
+ { \
|
|
||||||
+ static const char *table[] = { __VA_ARGS__ }; \
|
|
||||||
+ if (value < sizeof table / sizeof table[0]) \
|
|
||||||
+ *value_name = table[value]; \
|
|
||||||
+ } while (0)
|
|
||||||
+
|
|
||||||
+bool
|
|
||||||
+riscv_check_object_attribute (Ebl *ebl __attribute__ ((unused)),
|
|
||||||
+ const char *vendor, int tag, uint64_t value,
|
|
||||||
+ const char **tag_name, const char **value_name)
|
|
||||||
+{
|
|
||||||
+ if (!strcmp (vendor, "riscv"))
|
|
||||||
+ switch (tag)
|
|
||||||
+ {
|
|
||||||
+ case 4:
|
|
||||||
+ *tag_name = "RISCV_stack_align";
|
|
||||||
+ return true;
|
|
||||||
+
|
|
||||||
+ case 5:
|
|
||||||
+ *tag_name = "RISCV_arch";
|
|
||||||
+ return true;
|
|
||||||
+
|
|
||||||
+ case 6:
|
|
||||||
+ *tag_name = "RISCV_unaligned_access";
|
|
||||||
+ KNOWN_VALUES ("No unaligned access", "Unaligned access");
|
|
||||||
+ return true;
|
|
||||||
+
|
|
||||||
+ case 8:
|
|
||||||
+ *tag_name = "RISCV_priv_spec";
|
|
||||||
+ return true;
|
|
||||||
+
|
|
||||||
+ case 10:
|
|
||||||
+ *tag_name = "RISCV_priv_spec_minor";
|
|
||||||
+ return true;
|
|
||||||
+
|
|
||||||
+ case 12:
|
|
||||||
+ *tag_name = "RISCV_priv_spec_revision";
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return false;
|
|
||||||
+}
|
|
||||||
diff --git a/backends/riscv_init.c b/backends/riscv_init.c
|
|
||||||
index f2d46082..e5e9e33e 100644
|
|
||||||
--- a/backends/riscv_init.c
|
|
||||||
+++ b/backends/riscv_init.c
|
|
||||||
@@ -69,6 +69,8 @@ riscv_init (Elf *elf,
|
|
||||||
HOOK (eh, section_type_name);
|
|
||||||
HOOK (eh, dynamic_tag_name);
|
|
||||||
HOOK (eh, dynamic_tag_check);
|
|
||||||
+ HOOK (eh, check_object_attribute);
|
|
||||||
+ HOOK (eh, set_initial_registers_tid);
|
|
||||||
if (eh->class == ELFCLASS64)
|
|
||||||
eh->core_note = riscv64_core_note;
|
|
||||||
else
|
|
||||||
--
|
|
||||||
2.37.1
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
From 6560fb26a62ef135a804357ef4f15a47de3e49b3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mark Wielaard <mark@klomp.org>
|
|
||||||
Date: Tue, 10 Jan 2023 23:20:41 +0100
|
|
||||||
Subject: [PATCH 8/8] debuginfod-client: Use CURLOPT_PROTOCOLS_STR for libcurl
|
|
||||||
>= 7.85.0
|
|
||||||
|
|
||||||
https://sourceware.org/bugzilla/show_bug.cgi?id=29926
|
|
||||||
|
|
||||||
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
||||||
---
|
|
||||||
debuginfod/ChangeLog | 5 +++++
|
|
||||||
debuginfod/debuginfod-client.c | 5 +++++
|
|
||||||
2 files changed, 10 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
|
|
||||||
index a16165bd..1ce45632 100644
|
|
||||||
--- a/debuginfod/debuginfod-client.c
|
|
||||||
+++ b/debuginfod/debuginfod-client.c
|
|
||||||
@@ -1336,8 +1336,13 @@ debuginfod_query_server (debuginfod_client *c,
|
|
||||||
|
|
||||||
/* Only allow http:// + https:// + file:// so we aren't being
|
|
||||||
redirected to some unsupported protocol. */
|
|
||||||
+#if CURL_AT_LEAST_VERSION(7, 85, 0)
|
|
||||||
+ curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS_STR,
|
|
||||||
+ "http,https,file");
|
|
||||||
+#else
|
|
||||||
curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS,
|
|
||||||
(CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE));
|
|
||||||
+#endif
|
|
||||||
curl_easy_setopt_ck(data[i].handle, CURLOPT_URL, data[i].url);
|
|
||||||
if (vfd >= 0)
|
|
||||||
curl_easy_setopt_ck(data[i].handle, CURLOPT_ERRORBUFFER,
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
From 304741e11018c29e7ff17751e05dcc5c786a3fd9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mark Wielaard <mark@klomp.org>
|
|
||||||
Date: Wed, 21 Dec 2022 18:21:08 +0100
|
|
||||||
Subject: [PATCH 2/8] debuginfod: Define CURL_AT_LEAST_VERSION if necessary
|
|
||||||
|
|
||||||
Older curl.h don't define CURL_AT_LEAST_VERSION, so define it
|
|
||||||
ourselves because it is nicer than doing hex encoded version
|
|
||||||
comparisons.
|
|
||||||
|
|
||||||
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
||||||
---
|
|
||||||
debuginfod/ChangeLog | 4 ++++
|
|
||||||
debuginfod/debuginfod-client.c | 7 +++++++
|
|
||||||
2 files changed, 11 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
|
|
||||||
index 692aecce..a16165bd 100644
|
|
||||||
--- a/debuginfod/debuginfod-client.c
|
|
||||||
+++ b/debuginfod/debuginfod-client.c
|
|
||||||
@@ -105,6 +105,13 @@ void debuginfod_end (debuginfod_client *c) { }
|
|
||||||
#include <fts.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+/* Older curl.h don't define CURL_AT_LEAST_VERSION. */
|
|
||||||
+#ifndef CURL_AT_LEAST_VERSION
|
|
||||||
+ #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
|
|
||||||
+ #define CURL_AT_LEAST_VERSION(x,y,z) \
|
|
||||||
+ (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
static pthread_once_t init_control = PTHREAD_ONCE_INIT;
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From d2bf497b12fbd49b4996ccf0744303ffd67735b1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andrew Paprocki <andrew@ishiboo.com>
|
|
||||||
Date: Wed, 21 Dec 2022 11:15:00 -0500
|
|
||||||
Subject: [PATCH 1/8] PR29926: debuginfod: Fix usage of deprecated CURLINFO_*
|
|
||||||
|
|
||||||
The `CURLINFO_SIZE_DOWNLOAD_T` and `CURLINFO_CONTENT_LENGTH_DOWNLOAD_T`
|
|
||||||
identifiers are `enum`s, not pre-processor definitions, so the current
|
|
||||||
`#ifdef` logic is not selecting the newer API. This results in the
|
|
||||||
older identifiers being used and they now generate errors when compiled
|
|
||||||
against Curl 7.87, which has silently deprecated them, causing GCC to
|
|
||||||
emit `-Werror=deprecated-declarations`.
|
|
||||||
|
|
||||||
Instead, the newer identifiers were added in Curl 7.55, so explicitly
|
|
||||||
check for `CURL_AT_LEAST_VERSION(7, 55, 0)` instead of the current
|
|
||||||
logic. This eliminates the error when compiling against Curl 7.87.
|
|
||||||
|
|
||||||
Ref: https://github.com/curl/curl/pull/1511
|
|
||||||
|
|
||||||
Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
|
|
||||||
---
|
|
||||||
debuginfod/ChangeLog | 4 ++++
|
|
||||||
debuginfod/debuginfod-client.c | 4 ++--
|
|
||||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
|
|
||||||
index 8873fcc8..692aecce 100644
|
|
||||||
--- a/debuginfod/debuginfod-client.c
|
|
||||||
+++ b/debuginfod/debuginfod-client.c
|
|
||||||
@@ -1456,7 +1456,7 @@ debuginfod_query_server (debuginfod_client *c,
|
|
||||||
deflate-compressing proxies, this number is likely to be
|
|
||||||
unavailable, so -1 may show. */
|
|
||||||
CURLcode curl_res;
|
|
||||||
-#ifdef CURLINFO_CONTENT_LENGTH_DOWNLOAD_T
|
|
||||||
+#if CURL_AT_LEAST_VERSION(7, 55, 0)
|
|
||||||
curl_off_t cl;
|
|
||||||
curl_res = curl_easy_getinfo(target_handle,
|
|
||||||
CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
|
|
||||||
@@ -1491,7 +1491,7 @@ debuginfod_query_server (debuginfod_client *c,
|
|
||||||
if (target_handle) /* we've committed to a server; report its download progress */
|
|
||||||
{
|
|
||||||
CURLcode curl_res;
|
|
||||||
-#ifdef CURLINFO_SIZE_DOWNLOAD_T
|
|
||||||
+#if CURL_AT_LEAST_VERSION(7, 55, 0)
|
|
||||||
curl_off_t dl;
|
|
||||||
curl_res = curl_easy_getinfo(target_handle,
|
|
||||||
CURLINFO_SIZE_DOWNLOAD_T,
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:fb8b0e8d0802005b9a309c60c1d8de32dd2951b56f0c3a3cb56d21ce01595dff
|
|
||||||
size 9112977
|
|
Binary file not shown.
BIN
elfutils-0.189.tar.bz2
(Stored with Git LFS)
Normal file
BIN
elfutils-0.189.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
elfutils-0.189.tar.bz2.sig
Normal file
BIN
elfutils-0.189.tar.bz2.sig
Normal file
Binary file not shown.
@ -1,3 +1,25 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 3 16:52:50 UTC 2023 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
- Update to version 0.189:
|
||||||
|
* configure: eu-nm, eu-addr2line and eu-stack can provide demangled symbols
|
||||||
|
when linked with libstdc++. Use --disable-demangler to disable.
|
||||||
|
A new option --enable-sanitize-memory has been added for msan
|
||||||
|
sanitizer support.
|
||||||
|
* libelf: elf_compress now supports ELFCOMPRESS_ZSTD when build against
|
||||||
|
libzstd
|
||||||
|
* libdwfl: dwfl_module_return_value_location now returns 0 (no return type)
|
||||||
|
for DIEs that point to a DW_TAG_unspecified_type.
|
||||||
|
* elfcompress: -t, --type= now support zstd if libelf has been build with
|
||||||
|
ELFCOMPRESS_ZSTD support.
|
||||||
|
* backends: Add support for LoongArch and Synopsys ARCv2 processors.
|
||||||
|
- drop upsteam patches:
|
||||||
|
* elfutils-0.188-CURLOPT_PROTOCOLS_STR.patch
|
||||||
|
* elfutils-0.188-CURL_AT_LEAST_VERSION.patch
|
||||||
|
* elfutils-0.188-deprecated-CURLINFO.patch
|
||||||
|
* support-DW_TAG_unspecified_type.patch
|
||||||
|
- Enable -Werror=use-after-free again.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 23 09:29:20 UTC 2023 - Martin Liška <mliska@suse.cz>
|
Thu Feb 23 09:29:20 UTC 2023 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: elfutils-debuginfod
|
Name: elfutils-debuginfod
|
||||||
Version: 0.188
|
Version: 0.189
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Debuginfod server provided by elfutils
|
Summary: Debuginfod server provided by elfutils
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@ -29,12 +29,6 @@ Source1: https://fedorahosted.org/releases/e/l/elfutils/%{version}/elfuti
|
|||||||
Source3: elfutils.keyring
|
Source3: elfutils.keyring
|
||||||
Source4: %{name}.sysusers
|
Source4: %{name}.sysusers
|
||||||
Patch1: harden_debuginfod.service.patch
|
Patch1: harden_debuginfod.service.patch
|
||||||
Patch2: 0005-backends-Add-RISC-V-object-attribute-printing.patch
|
|
||||||
Patch3: support-DW_TAG_unspecified_type.patch
|
|
||||||
#PATCH-FIX-UPSTREAM Patches to fix deprecated curl options
|
|
||||||
Patch4: elfutils-0.188-CURLOPT_PROTOCOLS_STR.patch
|
|
||||||
Patch5: elfutils-0.188-CURL_AT_LEAST_VERSION.patch
|
|
||||||
Patch6: elfutils-0.188-deprecated-CURLINFO.patch
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
@ -51,6 +45,7 @@ BuildRequires: libzstd-devel
|
|||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: xz-devel
|
BuildRequires: xz-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
BuildRequires: zstd
|
||||||
|
|
||||||
# For debuginfod
|
# For debuginfod
|
||||||
BuildRequires: pkgconfig(libarchive) >= 3.1.2
|
BuildRequires: pkgconfig(libarchive) >= 3.1.2
|
||||||
@ -118,7 +113,7 @@ URL for a distribution.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%sysusers_generate_pre %{SOURCE4} %{name} %{name}.conf
|
%sysusers_generate_pre %{SOURCE4} %{name} %{name}.conf
|
||||||
export CFLAGS="%optflags -Werror=date-time -Wno-use-after-free"
|
export CFLAGS="%optflags -Werror=date-time"
|
||||||
CFLAGS+=" -g" # tests need debug info enabled (boo#1031556)
|
CFLAGS+=" -g" # tests need debug info enabled (boo#1031556)
|
||||||
%ifarch %sparc
|
%ifarch %sparc
|
||||||
# Small PIC model not sufficient
|
# Small PIC model not sufficient
|
||||||
|
@ -1,3 +1,31 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 3 16:52:50 UTC 2023 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
- Update to version 0.189:
|
||||||
|
* configure: eu-nm, eu-addr2line and eu-stack can provide demangled symbols
|
||||||
|
when linked with libstdc++. Use --disable-demangler to disable.
|
||||||
|
A new option --enable-sanitize-memory has been added for msan
|
||||||
|
sanitizer support.
|
||||||
|
* libelf: elf_compress now supports ELFCOMPRESS_ZSTD when build against
|
||||||
|
libzstd
|
||||||
|
* libdwfl: dwfl_module_return_value_location now returns 0 (no return type)
|
||||||
|
for DIEs that point to a DW_TAG_unspecified_type.
|
||||||
|
* elfcompress: -t, --type= now support zstd if libelf has been build with
|
||||||
|
ELFCOMPRESS_ZSTD support.
|
||||||
|
* backends: Add support for LoongArch and Synopsys ARCv2 processors.
|
||||||
|
- drop upsteam patches:
|
||||||
|
* elfutils-0.188-CURLOPT_PROTOCOLS_STR.patch
|
||||||
|
* elfutils-0.188-CURL_AT_LEAST_VERSION.patch
|
||||||
|
* elfutils-0.188-deprecated-CURLINFO.patch
|
||||||
|
* support-DW_TAG_unspecified_type.patch
|
||||||
|
- Enable -Werror=use-after-free again.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 2 12:59:54 UTC 2023 - Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
- Drop 0005-backends-Add-RISC-V-object-attribute-printing.patch, never
|
||||||
|
intented to be added
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 23 09:29:20 UTC 2023 - Martin Liška <mliska@suse.cz>
|
Thu Feb 23 09:29:20 UTC 2023 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: elfutils
|
Name: elfutils
|
||||||
Version: 0.188
|
Version: 0.189
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Higher-level library to access ELF files
|
Summary: Higher-level library to access ELF files
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@ -31,20 +31,17 @@ Source4: https://fedorahosted.org/releases/e/l/%{name}/%{version}/%{name}
|
|||||||
Source5: %{name}.keyring
|
Source5: %{name}.keyring
|
||||||
Source6: elfutils-rpmlintrc
|
Source6: elfutils-rpmlintrc
|
||||||
Patch1: harden_debuginfod.service.patch
|
Patch1: harden_debuginfod.service.patch
|
||||||
Patch2: 0005-backends-Add-RISC-V-object-attribute-printing.patch
|
|
||||||
Patch3: support-DW_TAG_unspecified_type.patch
|
|
||||||
#PATCH-FIX-UPSTREAM Patches to fix deprecated curl options
|
|
||||||
Patch4: elfutils-0.188-CURLOPT_PROTOCOLS_STR.patch
|
|
||||||
Patch5: elfutils-0.188-CURL_AT_LEAST_VERSION.patch
|
|
||||||
Patch6: elfutils-0.188-deprecated-CURLINFO.patch
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
|
# For libstdc++ demangle support
|
||||||
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: libbz2-devel
|
BuildRequires: libbz2-devel
|
||||||
BuildRequires: libzstd-devel
|
BuildRequires: libzstd-devel
|
||||||
BuildRequires: xz-devel
|
BuildRequires: xz-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
BuildRequires: zstd
|
||||||
|
|
||||||
%description
|
%description
|
||||||
elfutils is a collection of utilities and libraries to read, create
|
elfutils is a collection of utilities and libraries to read, create
|
||||||
@ -155,7 +152,7 @@ The package is dummy.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
||||||
export CFLAGS="%optflags -Werror=date-time -Wno-use-after-free"
|
export CFLAGS="%optflags -Werror=date-time"
|
||||||
CFLAGS+=" -g" # tests need debug info enabled (boo#1031556)
|
CFLAGS+=" -g" # tests need debug info enabled (boo#1031556)
|
||||||
%ifarch %sparc
|
%ifarch %sparc
|
||||||
# Small PIC model not sufficient
|
# Small PIC model not sufficient
|
||||||
|
@ -1,99 +0,0 @@
|
|||||||
From f638ab839a5c0a6fdfa666acdf6839ed827f0897 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mark Wielaard <mark@klomp.org>
|
|
||||||
Date: Thu, 26 Jan 2023 18:19:15 +0100
|
|
||||||
Subject: [PATCH] backends: Handle DW_TAG_unspecified_type in
|
|
||||||
dwarf_peeled_die_type
|
|
||||||
|
|
||||||
binutils 2.40 introduces DW_TAG_unspecified_type for assembly
|
|
||||||
functions with an unknown return type. This breaks the
|
|
||||||
run-funcretval.sh testcase because dwfl_module_return_value_location
|
|
||||||
returns an error for such functions because it cannot determine the
|
|
||||||
return value location. Fix that by treating DW_TAG_unspecified_type
|
|
||||||
as if the DIE doesn't have a DW_AT_type.
|
|
||||||
|
|
||||||
Also update the testcase to explicitly checking for
|
|
||||||
DW_TAG_unspecified_type and printing "returns unspecified type".
|
|
||||||
|
|
||||||
https://sourceware.org/bugzilla/show_bug.cgi?id=30047
|
|
||||||
|
|
||||||
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
||||||
---
|
|
||||||
NEWS | 5 +++++
|
|
||||||
backends/ChangeLog | 5 +++++
|
|
||||||
backends/libebl_CPU.h | 14 ++++++++++++--
|
|
||||||
tests/ChangeLog | 4 ++++
|
|
||||||
tests/funcretval.c | 14 +++++++++++++-
|
|
||||||
5 files changed, 39 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/backends/libebl_CPU.h b/backends/libebl_CPU.h
|
|
||||||
index 0e507bd3..a2898a1f 100644
|
|
||||||
--- a/backends/libebl_CPU.h
|
|
||||||
+++ b/backends/libebl_CPU.h
|
|
||||||
@@ -1,5 +1,6 @@
|
|
||||||
/* Common interface for libebl modules.
|
|
||||||
Copyright (C) 2000, 2001, 2002, 2003, 2005, 2013, 2014 Red Hat, Inc.
|
|
||||||
+ Copyright (C) 2023 Mark J. Wielaard <mark@klomp.org>
|
|
||||||
This file is part of elfutils.
|
|
||||||
|
|
||||||
This file is free software; you can redistribute it and/or modify
|
|
||||||
@@ -53,7 +54,9 @@ extern bool (*generic_debugscn_p) (const char *) attribute_hidden;
|
|
||||||
dwarf_tag (_die); })
|
|
||||||
|
|
||||||
/* Get a type die corresponding to DIE. Peel CV qualifiers off
|
|
||||||
- it. */
|
|
||||||
+ it. Returns zero if the DIE doesn't have a type, or the type
|
|
||||||
+ is DW_TAG_unspecified_type. Returns -1 on error. Otherwise
|
|
||||||
+ returns the result tag DW_AT value. */
|
|
||||||
static inline int
|
|
||||||
dwarf_peeled_die_type (Dwarf_Die *die, Dwarf_Die *result)
|
|
||||||
{
|
|
||||||
@@ -69,7 +72,14 @@ dwarf_peeled_die_type (Dwarf_Die *die, Dwarf_Die *result)
|
|
||||||
if (dwarf_peel_type (result, result) != 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
- return DWARF_TAG_OR_RETURN (result);
|
|
||||||
+ if (result == NULL)
|
|
||||||
+ return -1;
|
|
||||||
+
|
|
||||||
+ int tag = dwarf_tag (result);
|
|
||||||
+ if (tag == DW_TAG_unspecified_type)
|
|
||||||
+ return 0; /* Treat an unspecified type as if there was no type. */
|
|
||||||
+
|
|
||||||
+ return tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* libebl_CPU.h */
|
|
||||||
diff --git a/tests/funcretval.c b/tests/funcretval.c
|
|
||||||
index 16cd1a44..41198ab7 100644
|
|
||||||
--- a/tests/funcretval.c
|
|
||||||
+++ b/tests/funcretval.c
|
|
||||||
@@ -1,5 +1,6 @@
|
|
||||||
/* Test program for dwfl_module_return_value_location.
|
|
||||||
Copyright (C) 2005 Red Hat, Inc.
|
|
||||||
+ Copyright (C) 2023 Mark J. Wielaard <mark@klomp.org>
|
|
||||||
This file is part of elfutils.
|
|
||||||
|
|
||||||
This file is free software; you can redistribute it and/or modify
|
|
||||||
@@ -67,7 +68,18 @@ handle_function (Dwarf_Die *funcdie, void *arg)
|
|
||||||
error (EXIT_FAILURE, 0, "dwfl_module_return_value_location: %s",
|
|
||||||
dwfl_errmsg (-1));
|
|
||||||
else if (nlocops == 0)
|
|
||||||
- puts ("returns no value");
|
|
||||||
+ {
|
|
||||||
+ // Check if this is the special unspecified type
|
|
||||||
+ // https://sourceware.org/bugzilla/show_bug.cgi?id=30047
|
|
||||||
+ Dwarf_Die die_mem, *typedie = &die_mem;
|
|
||||||
+ Dwarf_Attribute attr_mem, *attr;
|
|
||||||
+ attr = dwarf_attr_integrate (funcdie, DW_AT_type, &attr_mem);
|
|
||||||
+ if (dwarf_formref_die (attr, typedie) != NULL
|
|
||||||
+ && dwarf_tag (typedie) == DW_TAG_unspecified_type)
|
|
||||||
+ puts ("returns unspecified type");
|
|
||||||
+ else
|
|
||||||
+ puts ("returns no value");
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf ("return value location:");
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user