From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 689E53858433; Sun, 12 May 2024 09:06:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 689E53858433 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1715504773; bh=7pZ9hbd4QxkVhpiTrSNbcdYgXr7+KSOUXypPnzO59o0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gq1VUW3NNQDLcR/VqnXXbhTxUP9wu5KqvB8jsAGFG2uCdfydJiTw5L9P1P2ChjNg7 g7inPb+PvZ1CqhErhKsYiJiMUOxC5LyD5LkVy+PQE00JmTvvmfLhSLMo47ULEd2X3m aJFaYSWxdmGVd5DQSi/gaNjmbI0cYcADAKtPBymw= From: "mark at klomp dot org" To: elfutils-devel@sourceware.org Subject: [Bug libdw/31447] Provide a public debug section relocation function Date: Sun, 12 May 2024 09:06:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: libdw X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dichen at redhat dot com 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=3D31447 --- Comment #3 from Mark Wielaard --- Yes, just process the .rela.debug_* sections. Note that you don't need to depend on the exact name. You can follow the section header sh_info field, which points to the section (number) to which the relocations apply. If that section starts with .debug you can apply the relocations. Or better use ebl_debugscn_p, which checks against the list in libebl/eblopenbackend.c (default_debugscn_p). See also in strip.c, where it says: /* Make sure that this relocation section points to a section to relocate with contents, that isn't allocated and that is a debug section. */ Or libdwfl/relocate.c (relocate_section). Which contains similar logic. --=20 You are receiving this mail because: You are on the CC list for the bug.=