diff --git a/golang.spec b/golang.spec index 215e178..85a0d94 100644 --- a/golang.spec +++ b/golang.spec @@ -201,6 +201,8 @@ Requires: %{name}-race = %{version}-%{release} Patch1: 0001-Modify-go.env.patch Patch6: 0006-Default-to-ld.bfd-on-ARM64.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 diff --git a/revert_dwarf5.patch b/revert_dwarf5.patch new file mode 100644 index 0000000..80a58bb --- /dev/null +++ b/revert_dwarf5.patch @@ -0,0 +1,42 @@ +From e90ae9076a108b83c645814f75a574c14a5a4b98 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= +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 + diff --git a/rpminspect.yaml b/rpminspect.yaml index 1fbe325..a2f17af 100644 --- a/rpminspect.yaml +++ b/rpminspect.yaml @@ -28,5 +28,6 @@ debuginfo: - /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/*