From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 9D0463858D33 for ; Wed, 3 Aug 2022 03:10:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9D0463858D33 Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id C96C366902; Tue, 2 Aug 2022 23:10:10 -0400 (EDT) Message-ID: <90d2f698eaa2ef88712e9aef453b1deff197b533.camel@xry111.site> Subject: Re: =?gb2312?Q?=BB=D8=B8=B4=A3=BA=5BPATCH?= v5] LoongArch: add movable attribute From: Xi Ruoyao To: "chenglulu@loongson.cn" , Chenghua Xu , "gcc-patches@gcc.gnu.org" Cc: Jinyang He , Huacai Chen , Youling Tang , Wang Xuerui Date: Wed, 03 Aug 2022 11:10:08 +0800 In-Reply-To: <-2muj1c-68saz6jhkcyw3jo1xp-1mgcvnkbqi2wjp6tue-qsso54-emxgu3-k85590-kpgox7-w67u6h3cai1l-5bi887dsgzsu-g4d7i7-wl316qxrucx4kv4on7-mnna36-iremg8-nwc5ot-9041t2-hu8nsl.1659495047941@email.android.com> References: <9b6b0e68cfb7e87ae961ef8a7bb7987f534da19c.camel@xry111.site> <6cafbcdf79f77b73b9329f3e3a2f24ec85eda94d.camel@xry111.site> <-2muj1c-68saz6jhkcyw3jo1xp-1mgcvnkbqi2wjp6tue-qsso54-emxgu3-k85590-kpgox7-w67u6h3cai1l-5bi887dsgzsu-g4d7i7-wl316qxrucx4kv4on7-mnna36-iremg8-nwc5ot-9041t2-hu8nsl.1659495047941@email.android.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 MIME-Version: 1.0 X-Spam-Status: No, score=3.8 required=5.0 tests=BAYES_00, BODY_8BITS, CHARSET_FARAWAY_HEADER, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, LIKELY_SPAM_FROM, PDS_OTHER_BAD_TLD, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: *** 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-List-Received-Date: Wed, 03 Aug 2022 03:10:20 -0000 On Wed, 2022-08-03 at 10:55 +0800, chenglulu@loongson.cn wrote: > I think there is no problem with this patch=E3=80=82But I have a question= . The > visibility attribute works, so is it necessary to add the moveable > attribute? 1. My use of -fPIC and visibility is not in the way ELF visibility has been designed for. It's hardly to tell if it's an legitimate use or a misuse. 2. Adding -fPIC can make unwanted side effects, especially: if we add some optimizations only suitable for -fno-PIC, we'll miss them using - fPIC. Note that -fPIC does not only mean "produce position independent code", but "produce position independent code *suitable for ELF dynamic libraries*". So to other people it will be ridiculous to use -fPIC for kernel. 3. Huacai said he didn't like using __attribute__((visibility)) like this (in kernel ML) and I share his feeling. > I'd like to wait for the kernel team to test the performance data of > the two implementations before deciding whether to support this > attribute. >=20 > What do you think=EF=BC=9F Perhaps, I can't access my dev system now anyway (I've configured the SSH access but then a sudden power surge happened and I didn't configured automatically power on :( ) >=20 --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University