From patchwork Wed Aug 28 11:01:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 96613 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 81B313860C2D for ; Wed, 28 Aug 2024 11:02:27 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 5C7BA385DDE0 for ; Wed, 28 Aug 2024 11:02:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C7BA385DDE0 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5C7BA385DDE0 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724842926; cv=none; b=lsHVbyViRvQqs5pmfmXT3A0jqSiVV/uuWj+/oB7jF2FEVJRd4tCLMlrgDZy7kqnn539+kgWJgUV8rx3wB5BUkG7YIQsFEh/cHaT8JXQ3hlI5LWbiJtHMerVm9M6N9CgdnrG5W1qd9PlvGs3nC77z7LxgmxlLdsHDA+ZVy/GEGhQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724842926; c=relaxed/simple; bh=mLa/8ONdI59NgaO0dei4teHk/qykcVlvMW6nbnbaxDk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=UCMBGAN4sa1FrC+UGV/S6BwQ1ejZqxSe+yTOx7dG8fJVoGJxz/KLAoqiUUvGWA57yFKCiBPasoBJqUHJ9WjN/IYFgEx24fkbJ2Vogs+rDpfBxfpZ0ziWqgMURc7WLIBaMybFdcrVidN2nLSU2Yb5zKNSJ3Y/LAPg57Ix8R6o5lQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724842924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=mLa/8ONdI59NgaO0dei4teHk/qykcVlvMW6nbnbaxDk=; b=hqGApHYrdzN25c6ZK2rQM8o+iWZeenadlT1FoGTGSMksL2uZsyu8rexM20kUqZxLDaBwCM LPnb/uc9zHz+EH++o4oi1NRZk8Uz3POLnLY8FRwrd7LCp7FJi4irGn3cB/KNssV7Yww5ik Ng2FIBGXc1mnQlq1BsbmsTF6diIZo2A= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-492-2A5QhGY6OhaDua5iTu_amQ-1; Wed, 28 Aug 2024 07:02:02 -0400 X-MC-Unique: 2A5QhGY6OhaDua5iTu_amQ-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8B6061955F6A; Wed, 28 Aug 2024 11:02:01 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.23]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 22A201955D58; Wed, 28 Aug 2024 11:01:59 +0000 (UTC) From: Florian Weimer To: Alejandro Colomar Cc: linux-man@vger.kernel.org, libc-alpha@sourceware.org Subject: [PATCH v2] dlinfo.3: Document the RTLD_DI_PHDR request Date: Wed, 28 Aug 2024 13:01:56 +0200 Message-ID: <87o75chpwb.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org First added in glibc 2.36, backported upstream to glibc 2.34, so mention 2.34.1 for the first version. Signed-off-by: Florian Weimer --- v2: Fix commit IDs. man/man3/dlinfo.3 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) base-commit: 6a7f1461b0e5474d50ef1920558dec103c0c058f diff --git a/man/man3/dlinfo.3 b/man/man3/dlinfo.3 index 84b696f8c..8158356bd 100644 --- a/man/man3/dlinfo.3 +++ b/man/man3/dlinfo.3 @@ -194,10 +194,23 @@ If this object does not define a PT_TLS segment, or if the calling thread has not allocated a block for it, NULL is placed in .IR *info . +.TP +.BR RTLD_DI_PHDR " (\fIconst ElfW(Phdr *)\fP, since glibc 2.34.1)" +.\" glibc commit d056c212130280c0a54d9a4f72170ec621b70ce5 (2.36) +.\" glibc commit 28ea43f8d64f0dd1f2de75525157730e1532e600 (2.35.1) +.\" glibc commit 91c2e6c3db44297bf4cb3a2e3c40236c5b6a0b23 (2.34.1) +Obtain the address of this shared object's program header and place it +in +.IR *info . +This +.B dlinfo +call returns the number of program headers in the shared object. .SH RETURN VALUE On success, .BR dlinfo () -returns 0. +returns 0 +(if not specified explicitly), +or a positive value corresponding to the request. On failure, it returns \-1; the error can be diagnosed using .BR dlerror (3). .SH ATTRIBUTES