https://sourceware.org/bugzilla/show_bug.cgi?id=33723

--- Comment #18 from David Abdurachmanov <david.abdurachmanov at gmail dot com> 
---
I have done the following change:

```
--- /root/macros.orig   2026-01-13 08:22:50.104182622 +0000
+++ redhat/macros       2026-01-13 10:22:38.039646271 +0000
@@ -356,7 +356,8 @@
 %_annotation_ldflags   %{?_lto_cflags:%{_annotation_cflags}}
 # Use the remove-section option to force the find-debuginfo script
 # to move the annobin notes into the separate debuginfo file.
-%_find_debuginfo_extra_opts %{?_annotated_build:--remove-section
.gnu.build.attributes}
+# Disable processing static libraries on riscv64 to avoid damaged DWARF
+%_find_debuginfo_vendor_opts %{?_annotated_build:--remove-section
.gnu.build.attributes} %[ "%{_target_cpu}" == "riscv64" ? "--no-ar-files" : ""
]

 # Include frame pointer information by default, except on RHEL 10 and earlier
 # On RHEL 11, we are enabling it for now, with the possibility of revoking it
```

I recompiled tcl, checked execution:

```
+ /usr/bin/find-debuginfo -j4 --strict-build-id -m -i --build-id-seed
9.0.2-1.rvre1.fc43 --unique-debug-suffix -9.0.2-1.rvre1.fc43.riscv64
--unique-debug-src-base tcl-9.0.2-1.rvre1.fc43.riscv64 --run-dwz
--dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 --remove-section
.gnu.build.attributes --no-ar-files -S debugsourcefiles.list
/home/fedora/rpmbuild/BUILD/tcl-9.0.2-build/tcl9.0.2
```

Note, --remove-section .gnu.build.attributes --no-ar-files

Installed tcl, compiled environment-modules and it worked.

I also checked environment-modules build log for:

/usr/bin/ld: /usr/lib64/libtclstub.a(tclStubLib.o): access beyond end of merged
section (446)
/usr/bin/ld: /usr/lib64/libtclstub.a(tclStubLib.o): access beyond end of merged
section (437)

These are gone too.

This basically reverts back to F42 debugedit behavior not to process static
archives (*.a) files. It seems debugedit on environment-modules build failed on
something it did before for tcl static archive.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to