From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 98D7D1F4B6 for ; Wed, 10 Jul 2019 14:16:01 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; q=dns; s=default; b=w8uqL 6mRYBd2aAr7OAFyTGyY6RaB65lPjdaBwgEzzvYBIEjqp9K3bkpfn1oRlilC/3vMq 6rWJJSehbPLP/Q4a/7hsdvud0FTwBTFwbIjk/iKcOx2zH5SOC2m6O8cLoivGf/IF wLWiI0UtyoWXjW/H1aW+TdTf8jjmyyIrE2WcIs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; s=default; bh=t0DDSWeNZR/ mQde8FgqCZWGjp60=; b=iJ8jLM66n7twOgBmU82kD/T8RdcaH+L5fTyKPkhj9/7 R6+Fm55sZSBrGsAZ5IR0rzK/ZBWLa9k9O2ZVunay3n8uIJvjaqprmipkXglC384j QROM78n28v6W9OfH+bcxc9/B+TFEQasE0UUsf9vDGisWtwDQY94ES45joEGh/4kY = Received: (qmail 95918 invoked by alias); 10 Jul 2019 14:15:58 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 95737 invoked by uid 89); 10 Jul 2019 14:15:43 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx1.redhat.com From: Florian Weimer To: Zack Weinberg Cc: GNU C Library Subject: Re: dlinfo for the calling shared library References: Date: Wed, 10 Jul 2019 16:15:31 +0200 In-Reply-To: (Zack Weinberg's message of "Wed, 10 Jul 2019 09:06:53 -0400") Message-ID: <87tvbu7z7g.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain * Zack Weinberg: > Do we have a supported way to make dlinfo() queries for the shared > library from which the call originates, without the library having to > know its own soname? (If it knows its own soname, it can call dlopen > on itself, but I'm looking into a scenario where that information is > not available.) dladdr1 with RTLD_DL_LINKMAP returns the link map, which has a public l_name member in . If you do not want to use the handle/link map equivalence, you could dlopen l_name, and that should give you back the same handle in an official way. Thanks, Florian