From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 65E6838930C9; Mon, 22 Jun 2020 15:19:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65E6838930C9 From: "carlos at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/26151] New: Add ET_* markers for debug files, and enhance ldd (ld.so) to use them. Date: Mon, 22 Jun 2020 15:19:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: 2.32 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: carlos at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 15:19:20 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26151 Bug ID: 26151 Summary: Add ET_* markers for debug files, and enhance ldd (ld.so) to use them. Product: glibc Version: 2.32 Status: NEW Severity: enhancement Priority: P2 Component: dynamic-link Assignee: unassigned at sourceware dot org Reporter: carlos at redhat dot com Target Milestone: --- Users use ldd to process directories full of files. In some cases ldd is used to process what appear to be ELF files. These ELF files are actually debuginfo objects that are only intended to be used with debuggers. The implementation of debuginfo objects is missing clear identification information because it does not allow for the easy disambiguation of these = ELF files as debuginfo. When ldd is run on these objects files the corrupt and invalid ELF data leads to crashes in ldd as it considers the objects to be valid ELF files (they contain valid ELF headers). There are a few solutions to this problem: (a) Duplicate in ldd what eu-elfclassify does. In an attempt to create a ro= bust identification tooling for object files Mark Wielaard and Florian Weimer created eu-elfclassify. This solution is conceptually wrong for ldd which should need to look at section headers, but would need to in order to dupli= cate what eu-elfclassify does. (b) Add ET_* markup for debuginfo files to clearly mark them as debuginfo f= iles and avoid the problem by teaching the downstream tools, ldd first, that such files are not be loaded or handled like normal ELF files. From an ELF perspective they are invalid and incomplete and must be parsed with differe= nt kinds of rules than normal ELF files. My preferred solution is (b), but doing that may take a long time to deploy. The short-term alternative is (a) followed eventually by (b) to remove the section header processing at a later date. --=20 You are receiving this mail because: You are on the CC list for the bug.=