From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id C39443858D38 for ; Tue, 8 Nov 2022 18:40:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C39443858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-x42a.google.com with SMTP id v1so22382348wrt.11 for ; Tue, 08 Nov 2022 10:40:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=thread-index:content-language:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:references:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=LJWfvod9jYRmZ0x8LMmtdgWgXl26pXYQ34A9PPrDyDQ=; b=Aozm6WbemzDZPPC5jpsLovbmo+sWWeOQKugYv7fVuQKaq5rSl74jkXOHEEKgLAjTaB oD+YCF3SJc/5KEwfP18HPS+2v5UnZRTMsR+EpeDWNeSOzpGB1kypNDhpf+r5jJ24JXah DtXwVqJ8lIu9ijvOgevm2MXy01kHDtvb4/mnC+JNsNdYPCs31LRfOZm/hK4oKYJs2zsK 5TFMWVvjbAQzVC/4l+i52IZYVsE6yJjkV6ekeZ/odpuGROp9nDbbJfnNOvdZfAZRSnHG /XLs9lmxYTjxaTducwqhzHFn0jCFEr5BYyFLUSsljXx/jkf9UrEDjCGVvG9YHwW5Q6f1 bRTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=thread-index:content-language:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:references:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LJWfvod9jYRmZ0x8LMmtdgWgXl26pXYQ34A9PPrDyDQ=; b=2dthaPWKKOt7KP7B5co+8doA5+K0o37sYYmtnIS3AWW0RwzLErngHAOqKtWrlOqaNs RgS3IkW4vVgAu1eTJgRAqMmq0nhspT09p0Nnug6GOzFn5qV+JAUeBqvYQt93/htNAmg4 FkOgkSZcW6g5UQlOwxCifrj8mQfgDEPDiNwA75mQobXntGdSXTsMS9jw0tnwbKpv6zco oYNZTyMHVObaIr5cTikgEhLs5mqC3aA4tct0ZkiQrPsfJjsWs4N3valpoiWZsjMvvKrk YTsVOCLzh8EZN9hZNFpUfrNxwYxZ6HSy4bIAm1TxKXeQvIyRbWhhBjF23FcDvzXiYBFI +a8Q== X-Gm-Message-State: ACrzQf0iRJlsG818ItaI0YW74C1yBcftdjxEFiCZ1GxTwFqdxw1rbHH4 WQIFrfbQsJWC80zuSqodPk2DBGC4qZGw2A== X-Google-Smtp-Source: AMsMyM4Wj/B9oiS6wIXLLn5OwvRqTY3uYP++oswnuwBAWkjKZ8u6S2S9GimQEGK87xL/SJKEg/gD8w== X-Received: by 2002:a05:6000:1d93:b0:22e:5d8a:c8f8 with SMTP id bk19-20020a0560001d9300b0022e5d8ac8f8mr36702078wrb.324.1667932829443; Tue, 08 Nov 2022 10:40:29 -0800 (PST) Received: from zach1 ([94.230.145.250]) by smtp.gmail.com with ESMTPSA id r2-20020adfdc82000000b0022ae401e9e0sm11162591wrj.78.2022.11.08.10.40.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Nov 2022 10:40:29 -0800 (PST) From: To: "'Alan Modra'" Cc: References: In-Reply-To: Subject: RE: [PATCH] GAS fix section alignment for aarch64-pe Date: Tue, 8 Nov 2022 19:40:28 +0100 Message-ID: <00e301d8f3a1$9318f440$b94adcc0$@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: en-gb Thread-Index: AQHa5uMCggOHjBsle5NFbaDQDNOvDAJFbTuWrh8vjwA= X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 List-Id: Hi Alan, Thanks for the feedback. You are correct - looks like I was over-focused on getting the write method working for various failing tests. Your example is useful to show missing noops. From what I can see the changes to md_section_align seem necessary for COFF but unrelated to the write issue. (Assuming the fix is HANDLE_ALIGN specific.) I will re-work the patch and do more testing. Might take a few days. Also, I will double check my email settings. Every email client I have tried (except git send-email) seems to break formatting one way or another. Cheers, Zac -----Original Message----- From: Alan Modra Sent: 07 November 2022 23:58 To: Zac Walker Cc: binutils@sourceware.org Subject: Re: [PATCH] GAS fix section alignment for aarch64-pe On Mon, Nov 07, 2022 at 06:53:35PM +0100, Zac Walker via Binutils wrote: > For the aarch64-pe target, section alignment for various values of > '.align' causes writing of coff files to fail. > This patch performs aligning in md_section_align as opposed to the > original approach in aarch64_handle_align. The change is specific to > the aarch64-pe target. This can't be correct since HANDLE_ALIGN and md_section_align perform quite different functions. I don't think you should be changing aarch64_handle_align. For example: .text .p2align 4 nop .p2align 3 nop The second p2align needs to continue emitting nops. (Also, please fix your email client to *not* format lines. Wrapping lines and changing white space breaks patches.) -- Alan Modra Australia Development Lab, IBM