From patchwork Mon Nov 14 17:24:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zac Walker X-Patchwork-Id: 19934 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2265793wru; Mon, 14 Nov 2022 09:24:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf7h1wfuz3R6gsDaeWL5LryYQauDkq0uPlxkuMAjpQP/1SQqAECISQ6fPAwzaKIxxtoDI/I2 X-Received: by 2002:aa7:d4d3:0:b0:45f:b80f:1fe8 with SMTP id t19-20020aa7d4d3000000b0045fb80f1fe8mr11486164edr.118.1668446675917; Mon, 14 Nov 2022 09:24:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668446675; cv=none; d=google.com; s=arc-20160816; b=A44iM2l71umvQlWuvE8NNY+hMOjURDEsipZnEwlpSBK9qDS8syQH73BZ74eT9T+//d 87du2pS28pT+/kxORGA2EWJpkTIQv9BMAaBKFIFS+3MRGk13LR2pPLx7Rlsc2GYrlmhO wP+TjRAVB3UvapZSj9WOeqXHiVBNxsOwLPoawiyukBQfNn8QNjMJjzI8w4PJVP56rIAo 42PJXrVaOMskBok+qPLf6ntFM3LnbnsoJ2itlGV6kV3Jz0Buz6KNWTQLx6D7gFUwYCUT Bg1fkeWWNGq10/19Krju+z3LBFuoL24tPBv/DBsaE/6NYgA7UnykWdIH2I07w/yU/H9F axSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :content-language:user-agent:mime-version:date:message-id :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=jZ1oViYbOQgdx5GeEUcMS906YTUYpC6X5q3Wipap1PQ=; b=xZczCdUaiVJ0BeBBvMUiOfemj524ci7yYQeHUGQOsgpDSP1Mn9Mznc7E0kPRb01lOs oJ3RvXSPOYhWkc4RAi3mnMZQuXxbvBDJKCUVyB+Fa9BzT2VsD6yjiPdudchZgmHYC5nx tYlaeQrYMj1rYEicd9p4R2vVZdtiWP0nmuujc5eGVVNIxmDitlRwBtob265W3dHfa6N4 JjZIHQRid9L2pjh97v21+MJFrP6rU39+U8k/nkST9OhPBO9oqJdeJ5xPBdRlJPYEsfaf FWRGJI08aUnDiy2ev/HXf5W4lBVlIE4xcaciF1ZiigydluuJhPU3DDwSSHITz/FDgbD9 UOlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=pnrzEzXt; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id hr22-20020a1709073f9600b0078e28a52d58si8756421ejc.874.2022.11.14.09.24.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 09:24:35 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=pnrzEzXt; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F062C385189C for ; Mon, 14 Nov 2022 17:24:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F062C385189C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668446675; bh=jZ1oViYbOQgdx5GeEUcMS906YTUYpC6X5q3Wipap1PQ=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=pnrzEzXtPk12W/OFmE/6ImYgz4v46r3uz3Sv1/YxOW0rMpir2rH84d+xWIOFTQFL3 Xo6zB7BkrycYJMxFwTEQ9/94/ZlVbw5mC9hFACglmaMO3vJdNpoDoEpsLNSZYw4Cun bK2FsQ93DSt8+mEQ/n6FQNErV6NGlMak7yEAdH/g= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id A758F3858428 for ; Mon, 14 Nov 2022 17:24:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A758F3858428 Received: by mail-ej1-x630.google.com with SMTP id y14so30044625ejd.9 for ; Mon, 14 Nov 2022 09:24:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jZ1oViYbOQgdx5GeEUcMS906YTUYpC6X5q3Wipap1PQ=; b=PBvPfO2IsBh8f4eOsob18U4kALyqLb3K0A4fRL7v/72eRAuclqYZlXmWjxRshbXHq9 9K6zRuySAovNO1kAj0xcFYcyLyDwJAAoqDnKxve4k5xNJGF16GrBYCGrxZteIvf12yt7 yBob3TAoPvwoyP+bMsYd6x3iYJCSHHSmO2VRED4s86AT+b1urFJUgk1Khc5uziS1mFTH qkyYVYx7id/nlNJUNZr6MkXKldAAPYXsVtcHkyIUBATjcOxt5vYx6Ovo83dsPDaykeja rFfxbJAUSfbpzbMGYqHaGB4fqvQ5MDV1DA6v3xrVaUFRUjMRhlNZd7+CD1/jdFThKL0j aMyg== X-Gm-Message-State: ANoB5pn3+oQOkdJ9RhMkN2WHEs1cfRLYJsIT+YmUkwfJq9ZVMZECA/V5 UX4fc4dqZHtK06OItu9FjkrBtC+z68Vz0A== X-Received: by 2002:a17:906:1441:b0:7ad:b97e:283a with SMTP id q1-20020a170906144100b007adb97e283amr10697188ejc.567.1668446664184; Mon, 14 Nov 2022 09:24:24 -0800 (PST) Received: from [172.31.227.58] ([94.230.145.250]) by smtp.gmail.com with ESMTPSA id q12-20020a056402032c00b0045d59e49acbsm5078422edw.7.2022.11.14.09.24.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Nov 2022 09:24:23 -0800 (PST) Message-ID: Date: Mon, 14 Nov 2022 18:24:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US To: binutils@sourceware.org Subject: [PATCH V2] GAS fix alignment for aarch64-pe X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Zac Walker via Binutils From: Zac Walker Reply-To: Zac Walker Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749493141611571890?= X-GMAIL-MSGID: =?utf-8?q?1749493141611571890?= For the aarch64-pe target various values of '.align' causes writing of COFF files to fail. This version of the patch differs from the first by using the write.c implementation of SUB_SEGMENT_ALIGN. This means there was no need to modify md_section_align or aarch64_handle_align. The change is specific to the aarch64-pe target. In my testing generated aligned code was correctly padded with nop. Thanks, Zac --- gas/config/tc-aarch64.h | 3 +++ 1 file changed, 3 insertions(+) From 392e919f35ad790b21185ab1ce387bb0694cddd9 Mon Sep 17 00:00:00 2001 From: Zac Walker Date: Mon, 14 Nov 2022 17:48:58 +0100 Subject: [PATCH] GAS fix alignment for aarch64-pe --- gas/config/tc-aarch64.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gas/config/tc-aarch64.h b/gas/config/tc-aarch64.h index 2d514ff610..0ea73021f2 100644 --- a/gas/config/tc-aarch64.h +++ b/gas/config/tc-aarch64.h @@ -191,7 +191,10 @@ struct aarch64_frag_type goto LABEL; \ } +/* COFF sub section alignment calculated using the write.c implementation. */ +#ifndef OBJ_COFF #define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0 +#endif #define DWARF2_LINE_MIN_INSN_LENGTH 4 -- 2.25.1