From patchwork Sat Jun 29 22:06:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Harmstone X-Patchwork-Id: 1954285 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; secure) header.d=harmstone.com header.i=@harmstone.com header.a=rsa-sha256 header.s=mail header.b=C6yzuAr2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.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 4WBRJn07vhz20Xf for ; Sun, 30 Jun 2024 08:08:25 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5C21D389F4FF for ; Sat, 29 Jun 2024 22:08:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail.burntcomma.com (mail2.burntcomma.com [217.169.27.34]) by sourceware.org (Postfix) with ESMTPS id 9E625389EC8F for ; Sat, 29 Jun 2024 22:07:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E625389EC8F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=harmstone.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=harmstone.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9E625389EC8F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.169.27.34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719698826; cv=none; b=vr4cLYZtI1YLDhtEYjdyqzAG7xypyz/YAeo+5i4yOyEHHVBKrw6/SBdT7aWyr2Zx2EINiSfTNVrSluWLxydrhsyu2D8ua4r2RWsFbhxM4RWINoWJiQtrqF0iE/P4iY6zbAJ4hafE4k4YcYW6V6GBR6IdAudN9NP3okjQ4dVNXDI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719698826; c=relaxed/simple; bh=k27Z9VVqPwFEHiXKwGtMRaPBQgBf9sM7APQ0WkYkWW8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:Mime-Version; b=kaYzrENaiZcJApJhdBRTHQsLYmXxncUl+8a84iApwfooH12/SS5Tm9Igx2mGrlK13LUZxLtARwVm1bcGME07bzr6hU/RS7UQPc1iksu80D42KOotiIWbdFhbw0nRBepxpK/E4QX3070WxNhiaYPk1OVSZWL2egztNPJgOUhfg1I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost.localdomain (beren.burntcomma.com [IPv6:2a02:8012:8cf0:0:b62e:99ff:fee9:ad9f]) (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) (Client did not present a certificate) by mail.burntcomma.com (Postfix) with ESMTPSA id 721143DA80F3; Sat, 29 Jun 2024 23:07:03 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=harmstone.com; s=mail; t=1719698823; bh=q1dCnrTufPUjOzPGXg4DV/GwCHya3+pZZEfYzIXEUdk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=C6yzuAr2HS2H4t0/GsVCqjF7HDMQHc76t0dZlyS7F52tcrm4YRvnhplxzKkVGN4Qj QwVBaixQeCgc6I7jdMcH84yW106RTM6DHKZ6xplzwAxHRScm1HhW8tryLCtgvg3qUD z0D1fgwhme7d8ZAG2+bDNut+puQUX8obPTt8+Yts= From: Mark Harmstone To: gcc-patches@gcc.gnu.org Cc: Mark Harmstone Subject: [PATCH 4/5] Make sure CodeView symbols are aligned Date: Sat, 29 Jun 2024 23:06:52 +0100 Message-ID: <20240629220653.4445-4-mark@harmstone.com> In-Reply-To: <20240629220653.4445-1-mark@harmstone.com> References: <20240629220653.4445-1-mark@harmstone.com> Mime-Version: 1.0 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_STOCKGEN, SPF_HELO_NONE, SPF_PASS, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org CodeView symbols have to be multiples of four bytes; add an alignment directive to write_data_symbol to ensure this. Note that these can be zeroes, so we can rely on GAS to do this for us; it's only types that need f3, f2, f1 values. gcc/ * dwarf2codeview.cc (write_data_symbol): Add alignment directive. --- gcc/dwarf2codeview.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/dwarf2codeview.cc b/gcc/dwarf2codeview.cc index 71049ccf878..5a33b439b14 100644 --- a/gcc/dwarf2codeview.cc +++ b/gcc/dwarf2codeview.cc @@ -958,6 +958,8 @@ write_data_symbol (codeview_symbol *s) ASM_OUTPUT_ASCII (asm_out_file, s->data_symbol.name, strlen (s->data_symbol.name) + 1); + ASM_OUTPUT_ALIGN (asm_out_file, 2); + targetm.asm_out.internal_label (asm_out_file, SYMBOL_END_LABEL, label_num); end: