From patchwork Mon Mar 20 06:33:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kewen.Lin" X-Patchwork-Id: 72007 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1049201wrt; Sun, 19 Mar 2023 23:34:25 -0700 (PDT) X-Google-Smtp-Source: AK7set/8soP6vZ5mUxSgXVhkNgrG7gdrW0SxErSGQOUs7wGj985PdQvz/sISNN56uBkeWwIvMoDt X-Received: by 2002:a05:6402:1507:b0:4fa:4a27:adba with SMTP id f7-20020a056402150700b004fa4a27adbamr10625539edw.22.1679294065154; Sun, 19 Mar 2023 23:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679294065; cv=none; d=google.com; s=arc-20160816; b=ewOP5ecRINOzbyqP8g+utjuo9stvOwpg1KWj1TT4N1QgN0QbO8lnnGJJDKQGEzQyML X1QRmqn37YmeO3FsVSzhANqUkUYffTmnHvC+3f+3D0xuGSTcQHBMwvR0PhL4g/8FPqQ6 RjHPamyfneloN6DJ9kCvHlZKRrbXEWKlI9ZcmQxFZ200EJxF5MBSJ3w5wVmAGOY4wL+n 7snXGXEzoI1r/zB6Me4bUd3Jm7NI99NUBDAQZe5wofIlCTJuzl6YBH0r9Qz6xFf+zWvv 4H4Pws6H685w3g6eZ49rbiiqte84Emv6b2YXeQq2IcGu17UDTfzNMcZCYeTWEnmvCLO+ bITA== 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 :content-transfer-encoding:cc:to:subject:content-language:user-agent :mime-version:date:message-id:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=0JlNqu78xgg2V/rdL9PUhsDQEWIzgWh5WTrXV0fYRqI=; b=dkxLI02zQ5uHNNt+5v6gtJ8qDqol/9EqC16VbsEY/ajlRSu0T74SkAXDdiaS4I7Gd7 b+EV/AvMi/7QRVkPpABeUR5UvtO2L7xfrtcPzcZ8DY+WeWJNR4KronbcH202BrC/Tinq hsGrLuEwgPcS2BUWd9ALraIuJ24Ic49AnHFtTr5aX2neDRneOe70TFGF4baVaNBZY/Ry cgI95xoWRQfFOLMkiJDumH9jWc0bZkjMoRQghxSfngIKAZb0KVfo2uH/dUandRPX5Lfw Ih0JPNAN5mgjEFasi7KK8l4hD+tl4eDBP6HJWQwxADx3tPAwRceSNT0q3y+YqsjNbE9e hqkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="aC/v6/6i"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id u6-20020a056402110600b004c087824bd0si9451327edv.47.2023.03.19.23.34.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 23:34:25 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="aC/v6/6i"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EC0CC3858289 for ; Mon, 20 Mar 2023 06:34:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC0CC3858289 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679294064; bh=0JlNqu78xgg2V/rdL9PUhsDQEWIzgWh5WTrXV0fYRqI=; h=Date:Subject:To:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=aC/v6/6iKjZnc32M0omdiX7gX02XjifeTULL6SF4X8NoyYeBthc4ug6xwE9PVsd74 Lloia5gQYv1HdjM38H6AYbLCegenqEEm5KQH+N7nKbrsgJ3/9XcOQ+k/ryV/IuQSIy AT4sfQB9+5EQHlaME19wFc+2SklvVrbBPTPpwerU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 7CD523858C53 for ; Mon, 20 Mar 2023 06:33:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7CD523858C53 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32K4e8S2014748; Mon, 20 Mar 2023 06:33:25 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pdqca7fxt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Mar 2023 06:33:25 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32K5SEPx038497; Mon, 20 Mar 2023 06:33:24 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pdqca7fx2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Mar 2023 06:33:24 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32K4YQBM022403; Mon, 20 Mar 2023 06:33:22 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma03ams.nl.ibm.com (PPS) with ESMTPS id 3pd4x6asq0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Mar 2023 06:33:22 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32K6XJZ625362800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 20 Mar 2023 06:33:19 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EE7FB20043; Mon, 20 Mar 2023 06:33:18 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8F44120049; Mon, 20 Mar 2023 06:33:15 +0000 (GMT) Received: from [9.177.11.227] (unknown [9.177.11.227]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 20 Mar 2023 06:33:15 +0000 (GMT) Message-ID: <050edd6f-0ad9-fbad-a9e5-03ec7b937971@linux.ibm.com> Date: Mon, 20 Mar 2023 14:33:13 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: en-US Subject: [PATCH] libgcc: Use initarray section type for .init_stack To: GCC Patches Cc: AlanM , Segher Boessenkool , David Edelsohn , Peter Bergner , Uros Bizjak , ian@airs.com, krebbel@linux.ibm.com X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Ha83oUCppCTYdOjIk8xEKYr8xzpODEc_ X-Proofpoint-ORIG-GUID: OLDST7vDqeG7yBQcfbQPQfXdV6mLE2lv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-20_04,2023-03-16_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 spamscore=0 adultscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 clxscore=1011 impostorscore=0 mlxscore=0 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303200057 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "Kewen.Lin via Gcc-patches" From: "Kewen.Lin" Reply-To: "Kewen.Lin" Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760867453593035839?= X-GMAIL-MSGID: =?utf-8?q?1760867453593035839?= Hi, One of my workmates found there is a warning like: libgcc/config/rs6000/morestack.S:402: Warning: ignoring incorrect section type for .init_array.00000 when compiling libgcc/config/rs6000/morestack.S. Since commit r13-6545 touched that file recently, which was suspected to be responsible for this warning, I did some investigation and found this is a warning staying for a long time. For section .init_stack*, it's preferred to use section type SHT_INIT_ARRAY. So this patch is use "@init_array" to replace "@progbits". Although the warning is trivial, Segher suggested me to post this to fix it, in order to avoid any possible misunderstanding/confusion on the warning. As Alan confirmed, this doesn't require a premise check on if the existing binutils supports "@init_array" or not, "because if you want split-stack to work, you must link with gold, any version of binutils that has gold has an assembler that understands @init_array". (Thanks Alan!) Bootstrapped and regtested on x86_64-redhat-linux and powerpc64{,le}-linux-gnu. Is it ok for trunk when next stage 1 comes? BR, Kewen ----- libgcc/ChangeLog: * config/i386/morestack.S: Use @init_array rather than @progbits for section type of section .init_array. * config/rs6000/morestack.S: Likewise. * config/s390/morestack.S: Likewise. --- libgcc/config/i386/morestack.S | 2 +- libgcc/config/rs6000/morestack.S | 2 +- libgcc/config/s390/morestack.S | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- 2.31.1 diff --git a/libgcc/config/i386/morestack.S b/libgcc/config/i386/morestack.S index 7ae99b50cf5..c822b71e2dd 100644 --- a/libgcc/config/i386/morestack.S +++ b/libgcc/config/i386/morestack.S @@ -850,7 +850,7 @@ __morestack_make_guard: # This is ELF specific. #if HAVE_INITFINI_ARRAY_SUPPORT - .section .init_array.00000,"aw",@progbits + .section .init_array.00000,"aw",@init_array #else .section .ctors.65535,"aw",@progbits #endif diff --git a/libgcc/config/rs6000/morestack.S b/libgcc/config/rs6000/morestack.S index f2fea6abb10..dd1e27cd454 100644 --- a/libgcc/config/rs6000/morestack.S +++ b/libgcc/config/rs6000/morestack.S @@ -399,7 +399,7 @@ ENTRY0(__morestack_make_guard) # Make __stack_split_initialize a high priority constructor. #if HAVE_INITFINI_ARRAY_SUPPORT - .section .init_array.00000,"aw",@progbits + .section .init_array.00000,"aw",@init_array #else .section .ctors.65535,"aw",@progbits #endif diff --git a/libgcc/config/s390/morestack.S b/libgcc/config/s390/morestack.S index 09a49bb8851..f52e7a6510c 100644 --- a/libgcc/config/s390/morestack.S +++ b/libgcc/config/s390/morestack.S @@ -597,7 +597,7 @@ __morestack_make_guard: # Make __stack_split_initialize a high priority constructor. #if HAVE_INITFINI_ARRAY_SUPPORT - .section .init_array.00000,"aw",@progbits + .section .init_array.00000,"aw",@init_array #else .section .ctors.65535,"aw",@progbits #endif