[Bug debugedit/33789] debugedit corrupts RISC-V object files

yaneti at declera dot com sourceware-bugzilla@sourceware.org
Thu Jan 22 09:07:25 GMT 2026


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

--- Comment #13 from Yanko Kaneti <yaneti at declera dot com> ---
Sharing my observations from yesterdays matrix session..

The debugedit patch fixes the issue in local testing i.e. the static libs
processed by find-debuginfo are no longer corrupted.

Mark suggested using elf-ellint to check the .o/.a before and after processing,
which turned up to show signs of something gone wrong.

e.g with instrumented  debugedit-5.2-3.rvre0.fc43.riscv64 (before the fix)
running extracting debuginfo from libtclstub.a

+ /usr/bin/find-debuginfo -j4 --strict-build-id -m -i --build-id-seed
9.0.2-1.fc43 --unique-debug-suffix -9.0.2-1.fc43.riscv64
--unique-debug-src-base tcl-9.0.2-1.fc43.riscv64 --run-dwz
--dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S
debugsourcefiles.list /builddir/build/BUILD/tcl-9.0.2-build/tcl9.0.2
find-debuginfo: starting
Extracting debug info from 3 files
Running eu-elflint on tclStubLib.o before debugedit
No errors
Running eu-elflint on tclStubLib.o after debugedit
section [25] '.symtab': symbol 1842 (.LASF1653): st_value out of bounds
section [25] '.symtab': symbol 1845 (.LASF1656): st_value out of bounds
Running eu-elflint on tclStubCall.o before debugedit
No errors
Running eu-elflint on tclStubCall.o after debugedit
section [26] '.symtab': symbol 204 (.LASF79): st_value out of bounds
section [26] '.symtab': symbol 207 (.LASF82): st_value out of bounds
Running eu-elflint on tclStubLibTbl.o before debugedit
No errors
Running eu-elflint on tclStubLibTbl.o after debugedit
section [20] '.symtab': symbol 1687 (.LASF1646): st_value out of bounds
section [20] '.symtab': symbol 1693 (.LASF1652): st_value out of bounds
Running eu-elflint on tclTomMathStubLib.o before debugedit
No errors
Running eu-elflint on tclTomMathStubLib.o after debugedit
section [23] '.symtab': symbol 1817 (.LASF1733): st_value out of bounds
section [23] '.symtab': symbol 1820 (.LASF1736): st_value out of bounds
section [23] '.symtab': symbol 1826 (.LASF1742): st_value out of bounds
Running eu-elflint on tclOOStubLib.o before debugedit
No errors
Running eu-elflint on tclOOStubLib.o after debugedit
section [23] '.symtab': symbol 1906 (.LASF1820): st_value out of bounds
section [23] '.symtab': symbol 1909 (.LASF1823): st_value out of bounds
section [23] '.symtab': symbol 1913 (.LASF1827): st_value out of bounds
DWARF-compressing 2 files
sepdebugcrcfix: Updated 2 CRC32s, 0 CRC32s did match.
Creating .debug symlinks for symlinks to ELF files
Copying sources found by 'debugedit -l' to
/usr/src/debug/tcl-9.0.2-1.fc43.riscv64
cpio: unix/.dtrace-temp.43961fde.c: Cannot stat: No such file or directory
find-debuginfo: done


Running eu-elflint on the whole libtclstub.a after processing
$ eu-elflint --gnu --debug 
/var/lib/mock/fedora-43-riscv64/root/builddir/build/BUILD/tcl-9.0.2-build/BUILDROOT/usr/lib64/libtclstub.a 

/var/lib/mock/fedora-43-riscv64/root/builddir/build/BUILD/tcl-9.0.2-build/BUILDROOT/usr/lib64/libtclstub.a(tclStubLib.o):
section [25] '.symtab': symbol 1842 (.LASF1653): st_value out of bounds
section [25] '.symtab': symbol 1845 (.LASF1656): st_value out of bounds

/var/lib/mock/fedora-43-riscv64/root/builddir/build/BUILD/tcl-9.0.2-build/BUILDROOT/usr/lib64/libtclstub.a(tclStubCall.o):
section [26] '.symtab': symbol 204 (.LASF79): st_value out of bounds
section [26] '.symtab': symbol 207 (.LASF82): st_value out of bounds

/var/lib/mock/fedora-43-riscv64/root/builddir/build/BUILD/tcl-9.0.2-build/BUILDROOT/usr/lib64/libtclstub.a(tclStubLibTbl.o):
section [20] '.symtab': symbol 1687 (.LASF1646): st_value out of bounds
section [20] '.symtab': symbol 1693 (.LASF1652): st_value out of bounds

/var/lib/mock/fedora-43-riscv64/root/builddir/build/BUILD/tcl-9.0.2-build/BUILDROOT/usr/lib64/libtclstub.a(tclTomMathStubLib.o):
section [23] '.symtab': symbol 1817 (.LASF1733): st_value out of bounds
section [23] '.symtab': symbol 1820 (.LASF1736): st_value out of bounds
section [23] '.symtab': symbol 1826 (.LASF1742): st_value out of bounds

/var/lib/mock/fedora-43-riscv64/root/builddir/build/BUILD/tcl-9.0.2-build/BUILDROOT/usr/lib64/libtclstub.a(tclOOStubLib.o):
section [23] '.symtab': symbol 1906 (.LASF1820): st_value out of bounds
section [23] '.symtab': symbol 1909 (.LASF1823): st_value out of bounds
section [23] '.symtab': symbol 1913 (.LASF1827): st_value out of bounds


With the debugedit patch all these lints are 'No errors'

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


More information about the Debugedit mailing list