From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mTj6Ig98ml9kfwAAWB0awg (envelope-from ) for ; Thu, 29 Oct 2020 04:23:43 -0400 Received: by simark.ca (Postfix, from userid 112) id 828B11EFC1; Thu, 29 Oct 2020 04:23:43 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9CFB11E552 for ; Thu, 29 Oct 2020 04:23:42 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1FA793858004; Thu, 29 Oct 2020 08:23:42 +0000 (GMT) Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050::465:202]) by sourceware.org (Postfix) with ESMTPS id 555C03858004 for ; Thu, 29 Oct 2020 08:23:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 555C03858004 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maringuu.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=personal@maringuu.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4CMJP60lBbzQlRH for ; Thu, 29 Oct 2020 09:23:38 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id SoYteKfiUfYQ for ; Thu, 29 Oct 2020 09:23:35 +0100 (CET) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Subject: [Question] Is there a way to specify an offset to the loaded symbols? From: "Marten Ringwelski" To: Date: Thu, 29 Oct 2020 09:13:58 +0100 Message-Id: X-MBO-SPAM-Probability: * X-Rspamd-Score: 0.04 / 15.00 / 15.00 X-Rspamd-Queue-Id: 2022917EC X-Rspamd-UID: 10ad0a X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-bounces@sourceware.org Sender: "Gdb" Hello, for some reason that is not important here I need to debug a binary that is= executed by calling the linker manually. In my case I do `/lib/ld-musl-x86_64.so.1 binary`. The problem with this is that gdb now obviously thinks that I want to debug= `/lib/ld-musl-x86_64.so.1`. This is not the case. Loading the symbols from `binary` does not help since the the linker loads = the process into memory and the jumps to its main. In other words I have the symbols for the binary to be debugged but the bin= ary is loaded into memory with an offset so the symbols are offseted. Is there any way to get this working? Thank you! Marten Ringwelski