From patchwork Thu Sep 7 19:38:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Jackson X-Patchwork-Id: 1831134 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=a66JMcRs; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (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 4RhV0l07j6z1yh1 for ; Fri, 8 Sep 2023 05:38:42 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BCC313857700 for ; Thu, 7 Sep 2023 19:38:40 +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 ESMTPS id 06E8E3858D20 for ; Thu, 7 Sep 2023 19:38:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 06E8E3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694115510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvJP1TtxDcp5OiJDnqzhHFQFxuVc2Rg7VbAno5ajjJI=; b=a66JMcRsQijvixUvSOs4af5lM7jFkJcLddo+4UP30OdfwGE4oTSiE9Ra8vb/LMYfpDRbAa 3mx8bcqVNp4TS9ueatHtCTXVEVk2poRrNDxcFGQOOFve7DeiPtylAV05skpsXrQbVrD0ZQ vf3DczqngY7Rrw0H51dk02vyRkLD+ag= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-632-RGGjbHg_Nd28pCdNdAOtFA-1; Thu, 07 Sep 2023 15:38:29 -0400 X-MC-Unique: RGGjbHg_Nd28pCdNdAOtFA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 178943C0EAD3 for ; Thu, 7 Sep 2023 19:38:29 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.22.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4F62C03293 for ; Thu, 7 Sep 2023 19:38:28 +0000 (UTC) From: Adam Jackson To: libc-alpha@sourceware.org Subject: [PATCH] libio: Fix oversized __io_vtables Date: Thu, 7 Sep 2023 15:38:28 -0400 Message-ID: <20230907193828.126271-1-ajax@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.9 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 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 IO_VTABLES_LEN is the expected size of the struct in bytes, not the number of __IO_jump_t's in the array. Drops just under 384kb from .rodata on LP64 machines. Fixes: 3020f72618e ("libio: Remove the usage of __libc_IO_vtables") Signed-off-by: Adam Jackson --- libio/vtables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libio/vtables.c b/libio/vtables.c index 1d8ad612e94..7cb894d751d 100644 --- a/libio/vtables.c +++ b/libio/vtables.c @@ -86,11 +86,11 @@ # pragma weak __wprintf_buffer_as_file_overflow # pragma weak __wprintf_buffer_as_file_xsputn #endif -const struct _IO_jump_t __io_vtables[IO_VTABLES_LEN] attribute_relro = +const struct _IO_jump_t __io_vtables[IO_VTABLES_NUM] attribute_relro = { /* _IO_str_jumps */ [IO_STR_JUMPS] = { JUMP_INIT_DUMMY,