From patchwork Fri Apr 29 17:38:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 53362 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 0FC293858405 for ; Fri, 29 Apr 2022 17:39:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FC293858405 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1651253955; bh=o0lhp3mhrhjZ/nR92Edq+NNoAQQ9AgXE7ZDCedRjPY8=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=KJ5vtFSbUDbMX+iTWHEm7t0nwPwesasoKdk9BIGSER0SzqQhr41TilM6mKSOi/roC DdyWzyPVNMd4nj7tXOdxqqlzJnoJqOY7eEqf7xmSfDygvP6JdObt9UuxaNxVY3cFU2 pObxNobbwyb8UImmSH/xmuEgRHNdUs1oCp9I7yoc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id AC39D3858D1E for ; Fri, 29 Apr 2022 17:38:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AC39D3858D1E Received: by mail-pl1-x629.google.com with SMTP id l6so1354186pls.10 for ; Fri, 29 Apr 2022 10:38:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=o0lhp3mhrhjZ/nR92Edq+NNoAQQ9AgXE7ZDCedRjPY8=; b=ufv/G96zsOM06pyf0e1AzJLo4EjhshetJhVlMacC32Tb2EJeNoR1ppb24GU6rQ3AMp m/Xw06HMX9NEgEiMdK17OP7b3o8BYRp2btQ+ra67cx3XGIZNZ0hzZYIOAMNG9Ne1IoAQ xwSAXCj6p42NlmEQ2Iu1W+iSqhLTQYfCeRDCRcEgIgIPaQ0ukGDYBeMyKaRjuY1eOKwM COeGrvpfizzaJR4CIk4WI7lAsInSCFbVnl36i7/4k1sjSZpdrUgD4pJO4b1ONbeeKt/5 kUJid7a96lRaIEau1IKg58dODadaUsabNjzGGyvSXa1mINdcr16Kz3R/3FA+LAGVa3vX /6Xw== X-Gm-Message-State: AOAM531PfTuk0kW0suqsaVxwMNxdRftl91RK1iDZjd4lsFd4ul4X9Cg6 XS6mGcsjE6YQYHlJEr3qjRGO8tQNWAQ= X-Google-Smtp-Source: ABdhPJxVV03wPY/+NomKlu8rJ0qBCx+vgJXE25IBmi7mnjlDJUhwfK0Iu4H6pGBQ+Qo4LHVaKUIzaQ== X-Received: by 2002:a17:903:22c7:b0:15d:3359:ca4c with SMTP id y7-20020a17090322c700b0015d3359ca4cmr486905plg.59.1651253922045; Fri, 29 Apr 2022 10:38:42 -0700 (PDT) Received: from gnu-tgl-3.localdomain ([172.58.88.122]) by smtp.gmail.com with ESMTPSA id ay5-20020a17090b030500b001d967248885sm15135033pjb.29.2022.04.29.10.38.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 10:38:41 -0700 (PDT) Received: from gnu-tgl-3.. (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id B686EC01C1 for ; Fri, 29 Apr 2022 10:38:39 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] x86: Add missing .note.GNU-stack to assembly source Date: Fri, 29 Apr 2022 10:38:39 -0700 Message-Id: <20220429173839.4127147-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3028.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Gcc-patches" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Add .note.GNU-stack assembly source to avoid linker warning: ld: warning: /tmp/ccPZSZ7Z.o: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker FAIL: gcc.target/i386/iamcu/test_3_element_struct_and_unions.c compilation, -O0 PR testsuite/105433 * gcc.target/i386/iamcu/asm-support.S: Add .note.GNU-stack. * gcc.target/x86_64/abi/asm-support.S: Likewise. * gcc.target/x86_64/abi/avx/asm-support.S: Likewise. * gcc.target/x86_64/abi/avx512f/asm-support.S: Likewise. * gcc.target/x86_64/abi/avx512fp16/asm-support.S: Likewise. * gcc.target/x86_64/abi/avx512fp16/m256h/asm-support.S: Likewise. * gcc.target/x86_64/abi/avx512fp16/m512h/asm-support.S: Likewise. * gcc.target/x86_64/abi/ms-sysv/do-test.S: Likewise. --- gcc/testsuite/gcc.target/i386/iamcu/asm-support.S | 1 + gcc/testsuite/gcc.target/x86_64/abi/asm-support.S | 1 + gcc/testsuite/gcc.target/x86_64/abi/avx/asm-support.S | 1 + gcc/testsuite/gcc.target/x86_64/abi/avx512f/asm-support.S | 1 + gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/asm-support.S | 1 + .../gcc.target/x86_64/abi/avx512fp16/m256h/asm-support.S | 1 + .../gcc.target/x86_64/abi/avx512fp16/m512h/asm-support.S | 1 + gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S | 1 + 8 files changed, 8 insertions(+) diff --git a/gcc/testsuite/gcc.target/i386/iamcu/asm-support.S b/gcc/testsuite/gcc.target/i386/iamcu/asm-support.S index b4a4a140e54..db08f52a34f 100644 --- a/gcc/testsuite/gcc.target/i386/iamcu/asm-support.S +++ b/gcc/testsuite/gcc.target/i386/iamcu/asm-support.S @@ -300,3 +300,4 @@ iamcu_noprintf: .align 4 .LCiamcu_noprintf1: .long 1132527616 + .section .note.GNU-stack,"",@progbits diff --git a/gcc/testsuite/gcc.target/x86_64/abi/asm-support.S b/gcc/testsuite/gcc.target/x86_64/abi/asm-support.S index 7a8ed03d119..2f8d3a09c6b 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/asm-support.S +++ b/gcc/testsuite/gcc.target/x86_64/abi/asm-support.S @@ -82,3 +82,4 @@ snapshot_ret: .comm xmm_regs,256,32 .comm x87_regs,128,32 .comm volatile_var,8,8 + .section .note.GNU-stack,"",@progbits diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx/asm-support.S b/gcc/testsuite/gcc.target/x86_64/abi/avx/asm-support.S index 73a59191d6d..77b3480ac32 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/avx/asm-support.S +++ b/gcc/testsuite/gcc.target/x86_64/abi/avx/asm-support.S @@ -79,3 +79,4 @@ snapshot_ret: .comm ymm_regs,512,32 .comm x87_regs,128,32 .comm volatile_var,8,8 + .section .note.GNU-stack,"",@progbits diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/asm-support.S b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/asm-support.S index 0ef82876dd9..2e3306c44cb 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/asm-support.S +++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/asm-support.S @@ -95,3 +95,4 @@ snapshot_ret: .comm zmm_regs,2048,64 .comm x87_regs,128,32 .comm volatile_var,8,8 + .section .note.GNU-stack,"",@progbits diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/asm-support.S b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/asm-support.S index 7849acd2649..0793acf048b 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/asm-support.S +++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/asm-support.S @@ -79,3 +79,4 @@ snapshot_ret: .comm xmm_regs,256,32 .comm x87_regs,128,32 .comm volatile_var,8,8 + .section .note.GNU-stack,"",@progbits diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m256h/asm-support.S b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m256h/asm-support.S index 73a59191d6d..77b3480ac32 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m256h/asm-support.S +++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m256h/asm-support.S @@ -79,3 +79,4 @@ snapshot_ret: .comm ymm_regs,512,32 .comm x87_regs,128,32 .comm volatile_var,8,8 + .section .note.GNU-stack,"",@progbits diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m512h/asm-support.S b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m512h/asm-support.S index 0ef82876dd9..2e3306c44cb 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m512h/asm-support.S +++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m512h/asm-support.S @@ -95,3 +95,4 @@ snapshot_ret: .comm zmm_regs,2048,64 .comm x87_regs,128,32 .comm volatile_var,8,8 + .section .note.GNU-stack,"",@progbits diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S index 7b891a140dc..f5dff4c10ab 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S +++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S @@ -30,6 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #ifdef __ELF__ # define FN_TYPE(fn) .type fn,@function # define FN_SIZE(fn) .size fn,.-fn + .section .note.GNU-stack,"",@progbits #else # define FN_TYPE(fn) # define FN_SIZE(fn)