From patchwork Wed Aug 14 21:33:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Merey X-Patchwork-Id: 95872 X-Patchwork-Delegate: mark@klomp.org 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 818B6385842D for ; Wed, 14 Aug 2024 21:33:53 +0000 (GMT) X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@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 00FFB3858D34 for ; Wed, 14 Aug 2024 21:33:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 00FFB3858D34 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 00FFB3858D34 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=1723671217; cv=none; b=D4SpVaAZh6ILcVesjVc4TEhDf88owYom/S6qVGA4lAdsvKtp492dgU66wrOtxy3uFv1L5pnN4+RWBDKxW+RMxwzuED6qhHzVYc123pyIZrVhiCjUOu7hhjnwPx+bqDm99SDg+D8v+cOkFjJnrSFAse/tEVJ6Of8d3KdhwD5sQDM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723671217; c=relaxed/simple; bh=NgRurHFmacCpBgvFLZJjD8T3gcBOfjKSPZ+6uAkRea4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=F9IeEeOj6ovcbk5urBj2nHzElTjPGuNek81HcMadv1c6KZ9zZivaAeclv8AZdrWwReEHYJsVFk8LOYwnJ+xyHofPsL20nmXxuuI0zubK5k0RrgWw6qUwmg7cYvU/dmS88MY/IyHpfIn2wGA4kUukIiSVbniX5E+rMXRNZw1dQjk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723671207; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AnxlID2FzmVQHmnPfX5/0hRD/9pLe8phYYIKmvFpYlM=; b=Mh1c/+6HC/nGG611xyDh0yxmC+tzV4zwCImRXSMljwc0h5CuamCF+Vt9N8n7DP3L1xpr4o jdP2/h3a37J6L2oz+cKGIGL7IlfTSy7uEKLuJ7xdxXpAwHoXzu0jrkX09Iqoq1SjcYdqxi sxF99muPpxqntPf4XoTCJmJYAiBUkCs= Received: from mx-prod-mc-03.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-504-zZM5s-nlNVe8a-yQwAYg3g-1; Wed, 14 Aug 2024 17:33:26 -0400 X-MC-Unique: zZM5s-nlNVe8a-yQwAYg3g-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5B8271944F05 for ; Wed, 14 Aug 2024 21:33:25 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.8.64]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7671119560A3; Wed, 14 Aug 2024 21:33:24 +0000 (UTC) From: Aaron Merey To: elfutils-devel@sourceware.org Cc: Aaron Merey Subject: [PATCH 2/9] doc: Add elf32_fsize.3 and elf64_fsize.3 Date: Wed, 14 Aug 2024 17:33:14 -0400 Message-ID: <20240814213321.244089-2-amerey@redhat.com> In-Reply-To: <20240814213321.244089-1-amerey@redhat.com> References: <20240814213321.244089-1-amerey@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, 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: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: elfutils-devel-bounces~patchwork=sourceware.org@sourceware.org Signed-off-by: Aaron Merey --- doc/elf32_fsize.3 | 59 +++++++++++++++++++++++++++++++++++++++++++++++ doc/elf64_fsize.3 | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 doc/elf32_fsize.3 create mode 100644 doc/elf64_fsize.3 diff --git a/doc/elf32_fsize.3 b/doc/elf32_fsize.3 new file mode 100644 index 00000000..ea86157f --- /dev/null +++ b/doc/elf32_fsize.3 @@ -0,0 +1,59 @@ +.TH ELF32_FSIZE 3 2024-08-14 "Libelf" "Libelf Programmer's Manual" + +.SH NAME +elf32_fsize \- calculate the file size of various ELF32 data structures + +.SH SYNOPSIS +.B #include + +.BI "size_t elf32_fsize(Elf_Type " type ", size_t " count ", unsigned int " version ");" + +.SH DESCRIPTION +Calculate the file size in bytes of various ELF32 data structures, +given their type and count. + +.SH PARAMETERS +.TP +.I type +The ELF32 data structure type for which the file size is to be calculated. See +.BR libelf.h +for a list of valid +.BR Elf_Type +values. + +.TP +.I count +The number of elements of the specified type. + +.TP +.I version +The ELF version. This should be set to +.B EV_CURRENT. + +.SH RETURN VALUE +The size in bytes of the specified count and type of data structure. If an error occurs, +return 0 and set a libelf error code. + +.SH SEE ALSO +.BR elf_errno (3), +.BR elf64_fsize (3), +.BR libelf (3), +.BR elf (5) + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.na +.nh +.BR elf32_fsize () +T} Thread safety MT-Safe +.TE + +.SH REPORTING BUGS +Report bugs to or https://sourceware.org/bugzilla/. diff --git a/doc/elf64_fsize.3 b/doc/elf64_fsize.3 new file mode 100644 index 00000000..45e1d04c --- /dev/null +++ b/doc/elf64_fsize.3 @@ -0,0 +1,59 @@ +.TH ELF64_FSIZE 3 2024-08-14 "Libelf" "Libelf Programmer's Manual" + +.SH NAME +elf64_fsize \- calculate the file size of various ELF64 data structures + +.SH SYNOPSIS +.B #include + +.BI "size_t elf64_fsize(Elf_Type " type ", size_t " count ", unsigned int " version ");" + +.SH DESCRIPTION +Calculate the file size in bytes of various ELF64 data structures, +given their type and count. + +.SH PARAMETERS +.TP +.I type +The ELF64 data structure type for which the file size is to be calculated. See +.BR libelf.h +for a list of valid +.BR Elf_Type +values. + +.TP +.I count +The number of elements of the specified type. + +.TP +.I version +The ELF version. This should be set to +.B EV_CURRENT. + +.SH RETURN VALUE +The size in bytes of the specified count and type of data structure. If an error occurs, +return 0 and set a libelf error code. + +.SH SEE ALSO +.BR elf_errno (3), +.BR elf32_fsize (3), +.BR libelf (3), +.BR elf (5) + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.na +.nh +.BR elf64_fsize () +T} Thread safety MT-Safe +.TE + +.SH REPORTING BUGS +Report bugs to or https://sourceware.org/bugzilla/.