update and fix an DW_TAG_unspecified_type issue
Resolves: https://issues.redhat.com/browse/RHEL-52280 Signed-off-by: Čestmír Kalina <ckalina@redhat.com>
This commit is contained in:
parent
a1b4779b8c
commit
2bb3548c8a
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@
|
||||
/kabi-dw-626d942.tar.gz
|
||||
/kabi-dw-6fbd644.tar.gz
|
||||
/kabi-dw-bd56a6004d5d409d7d03c386400da3f49a8c4c03.tar.gz
|
||||
/kabi-dw-eedfcbf9c60feedb532ad3d4d111ca93f7c32a26.tar.gz
|
||||
|
80
0001-generate-add-support-DW_TAG_unspecified_type.patch
Normal file
80
0001-generate-add-support-DW_TAG_unspecified_type.patch
Normal file
@ -0,0 +1,80 @@
|
||||
From 3c31cce7e2bdf9270c993508802ee782b4de44b4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C4=8Cestm=C3=ADr=20Kalina?= <ckalina@redhat.com>
|
||||
Date: Wed, 22 Jan 2025 19:49:08 +0100
|
||||
Subject: [PATCH] generate: add support DW_TAG_unspecified_type
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
GAS 2.40 and later add return type tag to DWARF DIEs generated for
|
||||
function symbols, introduced in [1]
|
||||
|
||||
commit 5578fbf672ee497ea19826edeb509f4cc3e825a8
|
||||
Author: Nick Clifton <nickc@redhat.com>
|
||||
Date: Thu Aug 25 11:48:00 2022 +0100
|
||||
|
||||
GAS: Add a return type tag to DWARF DIEs generated for function symbols.
|
||||
|
||||
This is compliant with the DWARFv5 stardard [2], Sec. 3.3.2 and Sec. 5.2.
|
||||
The resulting DW_TAG_subprogram then has a DW_AT_type attribute pointing to
|
||||
a DW_TAG_unspecified_type. For example,
|
||||
|
||||
arch/x86/entry/entry.S:
|
||||
SYM_FUNC_START(entry_ibpb)
|
||||
...
|
||||
RET
|
||||
SYM_FUNC_END(entry_ibpb)
|
||||
EXPORT_SYMBOL_GPL(entry_ibpb);
|
||||
|
||||
emits
|
||||
|
||||
DW_TAG_subprogram
|
||||
DW_AT_name ("entry_ibpb")
|
||||
DW_AT_external (true)
|
||||
DW_AT_type (0x12345678 "") -
|
||||
|
||||
0x12345678: DW_TAG_unspecified_type
|
||||
|
||||
As is, when processing DW_TAG_subprogram (print_die_subprogram), kabi-dw
|
||||
calls print_die_tag to determine the return type and fail on an unsupported
|
||||
DW_TAG:
|
||||
|
||||
print_die_tag():1845 Unexpected tag for symbol (null): 3b (unspecified_type)
|
||||
Generating symbol defs from kernel-6.12.0-42.el10.x86_64/vmlinux
|
||||
|
||||
This commit adds a new DW_TAG_unspecified_type case to said function's
|
||||
processing and treats it as a new "basetype" named "auto".
|
||||
|
||||
This corresponds to the following file func--entry_ibpb.txt:
|
||||
|
||||
Symbol:
|
||||
func entry_ibpb (
|
||||
)
|
||||
"auto"
|
||||
|
||||
[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5578fbf672ee497ea19826edeb509f4cc3e825a8
|
||||
|
||||
[2] https://dwarfstd.org/doc/DWARF5.pdf
|
||||
|
||||
Signed-off-by: Čestmír Kalina <ckalina@redhat.com>
|
||||
---
|
||||
generate.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/generate.c b/generate.c
|
||||
index d54f4bd..7b9d069 100644
|
||||
--- a/generate.c
|
||||
+++ b/generate.c
|
||||
@@ -1796,6 +1796,9 @@ static obj_t *print_die_tag(struct cu_ctx *ctx,
|
||||
obj = obj_var_new_add(safe_strdup(name), obj);
|
||||
obj_fill_ns(obj, ctx, obj->name);
|
||||
break;
|
||||
+ case DW_TAG_unspecified_type:
|
||||
+ obj = obj_basetype_new(safe_strdup("auto"));
|
||||
+ break;
|
||||
case DW_TAG_base_type:
|
||||
obj = obj_basetype_new(safe_strdup(name));
|
||||
break;
|
||||
--
|
||||
2.48.1
|
||||
|
18
kabi-dw.spec
18
kabi-dw.spec
@ -1,17 +1,18 @@
|
||||
%global forgeurl https://github.com/skozina/kabi-dw
|
||||
%global commitdate 20190729
|
||||
%global commit bd56a6004d5d409d7d03c386400da3f49a8c4c03
|
||||
%global commitdate 20230223
|
||||
%global commit eedfcbf9c60feedb532ad3d4d111ca93f7c32a26
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
|
||||
%forgemeta -i
|
||||
|
||||
Name: kabi-dw
|
||||
Version: 0
|
||||
Release: 0.28%{?dist}
|
||||
Release: 0.29%{?dist}
|
||||
Summary: Detect changes in the ABI between kernel builds
|
||||
License: GPL-3.0-or-later
|
||||
URL: %{forgeurl}
|
||||
Source0: %{forgesource}
|
||||
Patch0: 0001-generate-add-support-DW_TAG_unspecified_type.patch
|
||||
|
||||
BuildRequires: elfutils-devel
|
||||
BuildRequires: gcc
|
||||
@ -29,13 +30,9 @@ later comparing the text files.
|
||||
|
||||
%prep
|
||||
%forgesetup
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
#CFLAGS=$RPM_OPT_FLAGS LDFLAGS=$RPM_LD_FLAGS make debug
|
||||
|
||||
# The following option need to be removed once fixed upstream
|
||||
# https://github.com/skozina/kabi-dw/issues/17
|
||||
LDFLAGS+=" -z muldefs "
|
||||
|
||||
%set_build_flags
|
||||
%make_build
|
||||
@ -50,6 +47,11 @@ install -m 0755 %{name} %{buildroot}%{_bindir}/
|
||||
%license COPYING
|
||||
|
||||
%changelog
|
||||
* Thu Feb 06 2025 Čestmír Kalina <ckalina@redhat.com> - 0.29giteedfcb
|
||||
- Bump release and update to the latest upstream version
|
||||
Fix DW_TAG_unspecified_type issue
|
||||
Resolves: RHEL-52280
|
||||
|
||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - Packaging variables read or set by %forgemeta
|
||||
- Bump release for October 2024 mass rebuild:
|
||||
Resolves: RHEL-64018
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (kabi-dw-bd56a6004d5d409d7d03c386400da3f49a8c4c03.tar.gz) = 04fabb705b9e6161999c31c9ec542f205756e2e1797ebf564642a9ad12ef86ed2008acb6862be8d70acc6558f7f5555ee194507abbd003ceff4d46f5b767dd38
|
||||
SHA512 (kabi-dw-eedfcbf9c60feedb532ad3d4d111ca93f7c32a26.tar.gz) = 52022d7bf210b5ceb00813961b950118a5231b87525f160f4acfab894798995defae3f707b334277b527ba346dafb9605e7880ffb3d3112a49db84176c9de2be
|
||||
|
Loading…
Reference in New Issue
Block a user