[Bug debugedit/33789] debugedit corrupts RISC-V object files
david.abdurachmanov at gmail dot com
sourceware-bugzilla@sourceware.org
Thu Jan 22 09:55:26 GMT 2026
https://sourceware.org/bugzilla/show_bug.cgi?id=33789
--- Comment #14 from David Abdurachmanov <david.abdurachmanov at gmail dot com> ---
We landed debugedit-5.2-4.0.riscv64.fc43 with RFC patchset + performance
improvement for Rawhide (dd changes, not related to this issue) yesterday.
The build: https://riscv-koji.fedoraproject.org/koji/buildinfo?buildID=60319
We have rebuilt successfully <30 packages so far, most of them affected by tcl
and sysprof static libraries.
I suggested potentially using eu-elflint as an extra post-debugedit (or in
general as the last step) in
https://sourceware.org/cgit/debugedit/tree/scripts/find-debuginfo.in
This could be controlled by the flag, which we could enable in Fedora/RISCV for
some time, especially during rebuild of all affected libraries. Something like:
--- /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" ? "--elflint" : "" ]
# 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
```
This should produce a fatal error if something wrong is detected by eu-elflint
in any binary processed (executables, shared libraries, static libraries, or
even object files; basically ELF in some form and shape).
It would be nice to have have an option to provide some timing statistics from
find-debuginfo. There was a dd performance issue, and we don't have number how
much eu-elflint would cost. That's one of the reasons I suggested to enable it
on riscv64 too. Extra check, collect some statistics too.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Debugedit
mailing list