From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C914B385828B; Wed, 15 May 2024 11:34:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C914B385828B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1715772856; bh=Fpd15qA3nlcJK5zKE7/nJcdYJneYb81eyYxI8yh2P2Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BZ6sEXK+ZS3BNFag3srjqE8W6w73cYjmDgXqB9hzmCu9MsBKPd4/xdfKOavVUggZ/ lAFdsVHxsqT1GnklMbHbiznXtp1NbtoGM1vSu+gt0w6cFby7BCjnqx19rFmkPeQCKZ lURoKXBYJzv2DMVR9x1c/x8uvjoZWeOSV4HPykMw= From: "mark at klomp dot org" To: debugedit@sourceware.org Subject: [Bug debugedit/31504] debugedit writes out ELF file even when nothing has been updated Date: Wed, 15 May 2024 11:34:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: debugedit X-Bugzilla-Component: debugedit X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31504 --- Comment #10 from Mark Wielaard --- (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. >=20 > If in the course of doing its work, debugedit does not account for the fu= ll > 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 whet= her the "gaps" in the file are intentional or not. There are different structur= es (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 hea= der) is fixed, everything else can appear at some later point in the file in no particular order and there can be gaps. --=20 You are receiving this mail because: You are on the CC list for the bug.=