From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12349 invoked from network); 31 Mar 2022 18:26:47 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 31 Mar 2022 18:26:47 -0000 Received: (qmail 9606 invoked by uid 550); 31 Mar 2022 18:26:43 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 9562 invoked from network); 31 Mar 2022 18:26:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chikhaoui.org; h=cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm3; bh=r uvHHcNKByj6ObIWqbXl2m9uGGMiOqC/k3WNN6ZwCOY=; b=epXN/ORrCoU2db8sY E0nMQH1KUxETPY4u5jqbDAzNyNIDxsTj57e46REnXNZZ7rm5uoxAvOK66Yvk+vt2 OdVdl8cOlWBYoVGzjj3T72CVHJXkzQmhbVxliKngRjYgsKk1Im16t5sSCttWS5Cp 9uAtrydMwJwlzilM7MmljBOuXVxhIB53mWDE1LQ6XdOdr9RSeg/uP8pBXA/Hq09i ou9WSpRMarOUTp8sWGWejFf0RjCIJL4oahYHtm1u6u7JfeGHG8qe7FitCndbyFVG c/8RnyUVMA7A3Pwb1BQo2tGM57CpMzcx5mv2gVwiAGKFepHLUboERQtxTmqldl20 ftarg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=ruvHHcNKByj6ObIWqbXl2m9uGGMiOqC/k3WNN6ZwC OY=; b=Cec1c1RB3sRVdcnOPz7F9NE4+g7MX7JdADqZXuar7Wr2F6nKernov4vDb Va56LtbQlzstcark53lE6R4BzmEfMMPV41v7jdp1IbkDlYYmXKdz7S1C9OxRZfVu hylRj09DFGzgK0QjWTn5pVuiPUDt1B8MLiELCrYieve/nKEY2dJ7xCchW2Yxytak bfpd/YcIXZR9QccBg9QuNNh1Q/HFiv//EOSX5OhpWvIJGj6l+LSLuIh1swgiTMko lnZFr4jTjOgx/KQg8bLz38Z0G+0CPIfUjl1lo6n3eMZ5mtyXJH2ibRWSunGkdCBr JPZpVa0l6jW14QOuvXrWwirf01AMw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeigedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggufgesthdtre dttdervdenucfhrhhomheptehmihhnvgcuvehhihhkhhgrohhuihcuoegrmhhinhgvsegt hhhikhhhrghouhhirdhorhhgqeenucggtffrrghtthgvrhhnpeekueekfeduffffiefhte elkefhgeehteeuhffhueegteefveefgeeiteeileelheenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrmhhinhgvsegthhhikhhhrghouhhird horhhg X-ME-Proxy: Date: Thu, 31 Mar 2022 14:26:28 -0400 From: Amine Chikhaoui To: musl@lists.openwall.com Message-ID: <20220331182628.7ofplkycqrjkoyov@nixos> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20180716 Subject: [musl] Question: dladdr alternative for symbol info lookup with full static linking Hello, I posted this question on #musl irc a week or so ago, but I don't think anyone noticed so trying the mailing list instead: >> I have a C++ project that I'm trying to statically link using musl. >> Part of it has some logic for printing stacktraces, it does that by >> using from libgcc, but then when it gets to dladdr((void*) >> ip, &info), where ip is the result of _Unwind_GetIPInfo, that seems to >> always return an error. >> It seems that this isn't the correct way to do things when statically >> linking, is there an easy way to handle this? the main thing it tries >> to do is get the function/symbol name demangled using >> abi::__cxa_demangle later and print a stacktrace. Just looking for any alternatives for doing something similar in order to print a useful stacktrace when in a statically linked binary context. Amine