[Bug debugedit/31504] debugedit writes out ELF file even when nothing has been updated
mark at klomp dot org
sourceware-bugzilla@sourceware.org
Wed May 15 11:34:15 GMT 2024
https://sourceware.org/bugzilla/show_bug.cgi?id=31504
--- Comment #10 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Jamin Collins from comment #9)
> why not simply have debugedit detect (or watch) whether it has accounted for
> the full file contents. If it has, great, do its thing. If it has not,
> leave the file untouched/altered.
>
> If in the course of doing its work, debugedit does not account for the full
> file contents, then the file is (as has been indicated) not a proper spec
> conforming ELF file. As such, debugedit (and other ELF tools) should
> probably leave the file as-is, unless explicitly told otherwise (perhaps an
> additional flag).
debugedit simply uses (elfutils) libelf. And libelf cannot really know whether
the "gaps" in the file are intentional or not. There are different structures
(section headers, program headers, section data) which can appear "randomly" in
the file, it isn't simply a stream. Only the start of the file (the ELF header)
is fixed, everything else can appear at some later point in the file in no
particular order and there can be gaps.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Debugedit
mailing list