Revert DWARF5 defaults

Add elf5 to rpminspect.yaml

Related: RHEL-109557
This commit is contained in:
Alejandro Sáez 2025-09-11 14:47:36 +02:00
parent 80fe1ec7a3
commit f2d9e7e92e
3 changed files with 53 additions and 1 deletions

View File

@ -102,7 +102,7 @@
Name: golang
Version: %{version}
Release: 1%{?dist}
Release: 2%{?dist}
Summary: The Go Programming Language
# source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain
License: BSD and Public Domain
@ -154,6 +154,8 @@ Patch1939923: skip_test_rhbz1939923.patch
Patch4: modify_go.env.patch
Patch6: skip_TestCrashDumpsAllThreads.patch
# Related: https://sourceware.org/bugzilla/show_bug.cgi?id=33204
Patch7: revert_dwarf5.patch
# Having documentation separate was broken
Obsoletes: %{name}-docs < 1.1-4
@ -588,6 +590,11 @@ cd ..
%endif
%changelog
* Fri Sep 12 2025 Alejandro Sáez <asm@redhat.com> - 1.25.0-2
- Revert DWARF5 defaults
- Add elf5 to rpminspect.yaml
- Related: RHEL-109557
* Wed Aug 20 2025 Alejandro Sáez <asm@redhat.com> - 1.25.0-1
- Update to Go 1.25.0
- Set GOAMD64 to v2 to align with new architecture baselines

42
revert_dwarf5.patch Normal file
View File

@ -0,0 +1,42 @@
From e90ae9076a108b83c645814f75a574c14a5a4b98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= <asm@redhat.com>
Date: Wed, 27 Aug 2025 16:18:09 +0200
Subject: [PATCH] Revert DWARF5 as default, use DWARF4
---
src/internal/buildcfg/exp.go | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/src/internal/buildcfg/exp.go b/src/internal/buildcfg/exp.go
index 689ca8ce58..b2ea97481b 100644
--- a/src/internal/buildcfg/exp.go
+++ b/src/internal/buildcfg/exp.go
@@ -67,24 +67,13 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) {
regabiSupported = true
}
- // Older versions (anything before V16) of dsymutil don't handle
- // the .debug_rnglists section in DWARF5. See
- // https://github.com/golang/go/issues/26379#issuecomment-2677068742
- // for more context. This disables all DWARF5 on mac, which is not
- // ideal (would be better to disable just for cases where we know
- // the build will use external linking). In the GOOS=aix case, the
- // XCOFF format (as far as can be determined) doesn't seem to
- // support the necessary section subtypes for DWARF-specific
- // things like .debug_addr (needed for DWARF 5).
- dwarf5Supported := (goos != "darwin" && goos != "ios" && goos != "aix")
-
baseline := goexperiment.Flags{
RegabiWrappers: regabiSupported,
RegabiArgs: regabiSupported,
AliasTypeParams: true,
SwissMap: true,
SyncHashTrieMap: true,
- Dwarf5: dwarf5Supported,
+ Dwarf5: false,
}
// Start with the statically enabled set of experiments.
--
2.51.0

View File

@ -24,7 +24,10 @@ debuginfo:
- /usr/lib/golang/pkg/tool/linux_*/test2json
- /usr/lib/golang/pkg/tool/linux_*/trace
- /usr/lib/golang/pkg/tool/linux_*/vet
# rpminspect: preprofile in golang package contains debugging symbols (RHEL-61237)
- /usr/lib/golang/pkg/tool/linux_*/preprofile
# go testdata
- /usr/lib/golang/src/debug/dwarf/testdata/*.elf
- /usr/lib/golang/src/debug/dwarf/testdata/*.elf5
- /usr/lib/golang/src/debug/elf/testdata/*
- /usr/lib/golang/src/runtime/pprof/testdata/*