From patchwork Wed Aug 28 07:13:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1977634 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=XNXL2GCX; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WtwdJ2PzBz1yZd for ; Wed, 28 Aug 2024 17:14:11 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9EB323860760 for ; Wed, 28 Aug 2024 07:14:09 +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.129.124]) by sourceware.org (Postfix) with ESMTP id BF5B93858D39 for ; Wed, 28 Aug 2024 07:13:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BF5B93858D39 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 BF5B93858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724829235; cv=none; b=aoEmi3t/0iCfHu/jEbV95Vh54W/zJlG8oFPjbDTk3BVQhK/4OWe0BMwomWI+X2+fU6htWwfz+TBZdx0MN/D2XH//JkzfKBsPUL4+DPoC9vtssMpBHxFyovFjAS3aDWQOoXPEO5sIBXjhimYA6ZjfI0+uytMEG85csLB1qO1iOY0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724829235; c=relaxed/simple; bh=41h9WGde+/21JdbJwvZq6ZFLZwNWnLj46FRqyLeIlnY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=P04OYgRp1ddpIkNWc/y8386FzDUfHuHnSJJGi1FzvwPw9/ZOomma+IZnqf1XDJIBB7IuH3l0jW+2jqypnow8EZFVN0x8hcwVYe3mR2iRbXq4XGi3Y21kesNE2kzq/CZcXbQ/NH6ATfW8TqOrMCKI0LZhT6Hk7qMME5Y8Vx+gOEE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724829233; 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=41h9WGde+/21JdbJwvZq6ZFLZwNWnLj46FRqyLeIlnY=; b=XNXL2GCX3tt+q8RXy9PHdamAAzHfWL26PvX0bxaEHeusEZnR5KLsZDoHyGx5aLtkGKdZoF 6lmUZtwbXywDaz+WLPe1WQJe+LCDgySr4JvJ9vTm5uRq28qZagJ2nUBSmWJXa8QcTQTkNB ffIGi8YhT6YTdC17fkgFcUggv45papU= 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-1-uXufNxFjMUSe-wPCBS5C5Q-1; Wed, 28 Aug 2024 03:13:47 -0400 X-MC-Unique: uXufNxFjMUSe-wPCBS5C5Q-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 6A1C01955F45; Wed, 28 Aug 2024 07:13:46 +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 AD7511955D42; Wed, 28 Aug 2024 07:13:44 +0000 (UTC) From: Florian Weimer To: Alejandro Colomar Cc: linux-man@vger.kernel.org, libc-alpha@sourceware.org Subject: [PATCH] dlinfo.3: Document the RTLD_DI_PHDR request Date: Wed, 28 Aug 2024 09:13:41 +0200 Message-ID: <87jzg1p1ay.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_H3, 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~incoming=patchwork.ozlabs.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 --- 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..8d61f81e8 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 d056c212130280c0a54d9a4f72170ec621b70ce5 (2.35) +.\" glibc commit 91c2e6c3db44297bf4cb3a2e3c40236c5b6a0b23 (2.34) +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