public inbox for debugedit@sourceware.org
 help / color / mirror / Atom feed
* [Bug debugedit/31504] New: debugedit writes out ELF file even when nothing has been updated
@ 2024-03-17 14:46 mark at klomp dot org
  2024-03-18  8:20 ` [Bug debugedit/31504] " sam at gentoo dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: mark at klomp dot org @ 2024-03-17 14:46 UTC (permalink / raw)
  To: debugedit

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

            Bug ID: 31504
           Summary: debugedit writes out ELF file even when nothing has
                    been updated
           Product: debugedit
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: debugedit
          Assignee: unassigned at sourceware dot org
          Reporter: mark at klomp dot org
                CC: debugedit at sourceware dot org
  Target Milestone: ---

See also
https://gitlab.archlinux.org/archlinux/packaging/packages/pacman/-/issues/19#note_171380
(warning javascript)

Basically what happens is that these .net ELF files are not really ELF files,
but are ELF files with some extra data tagged on. Since libelf doesn't know
anything about this extra data in the file it will simply truncate it after all
known ELF data structures are written out. This is normally harmless because
elf_update ELF_C_WRITE doesn't really write out anything that hasn't changed.
But in this case it does.

What we could do at the end of main () is to check needs_update, and probably
all needs_xxx_update flags, and simply not call elf_update if all of them are
false.

Note that this doesn't help if anything does really (need) updates. This is
really not a valid ELF file. But it will help if someone only wants the
build-id or file list.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-05-15 11:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-17 14:46 [Bug debugedit/31504] New: debugedit writes out ELF file even when nothing has been updated mark at klomp dot org
2024-03-18  8:20 ` [Bug debugedit/31504] " sam at gentoo dot org
2024-03-18 22:40 ` mark at klomp dot org
2024-03-21  0:05 ` allan at archlinux dot org
2024-03-21 11:46 ` mark at klomp dot org
2024-03-21 12:07 ` mark at klomp dot org
2024-03-21 21:23 ` allan at archlinux dot org
2024-03-22 12:29 ` mark at klomp dot org
2024-03-22 22:13 ` allan at archlinux dot org
2024-03-22 23:47 ` mark at klomp dot org
2024-04-29 19:59 ` jamin.collins at gmail dot com
2024-05-15 11:34 ` mark at klomp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).