From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 3581D3853D43 for ; Wed, 23 Nov 2022 11:18:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3581D3853D43 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1669202301; bh=Ws8CGXGO8BgplX4IXoZBskZoJTe8Mh4Fwt7K22BfXdo=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=kciSSZU4mxnQ7bWa0RLq4tniwlhvodUt0pBoAjG+S4AVBVYjbydvHXqMyd4gbHO7y lxYbwl2xQBzc8uN+el01vx31/Hnkr42w1UVzqPCppC1gBMNbqQfr3w1W1SxO8AedwB 3pridLBk9lNx9AeGpVom6+omqpof7RKftHmLPbbk= 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 21D6766228; Wed, 23 Nov 2022 06:18:19 -0500 (EST) Message-ID: <33054b9098f4ef690cd1639e96b2c148e9e9e490.camel@xry111.site> Subject: Re: [PATCH] LoongArch: Use medium cmodel build libc_nonshared.a. From: Xi Ruoyao To: Florian Weimer , caiyinyu Cc: adhemerval.zanella@linaro.org, libc-alpha@sourceware.org, i.swmail@xen0n.name, xuchenghua@loongson.cn Date: Wed, 23 Nov 2022 19:18:18 +0800 In-Reply-To: <87zgcim07m.fsf@oldenburg.str.redhat.com> References: <20221123070905.1618136-1-caiyinyu@loongson.cn> <87zgcim07m.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,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-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 2022-11-23 at 11:31 +0100, Florian Weimer wrote: > > From: Chenghua Xu > >=20 > > This patch is used to fix address out-of-bounds error when building > > firefox. >=20 > The .c files shouldn't be necessary.=C2=A0 The CFLAGS additions should > perhaps be made subdirectory-specific.=C2=A0 And I think these days, > libc_nonshared.a is much, much small (and we could size it down even > further). In my build libc_nonshared.a only contains: - at_quick_exit.oS - atexit.oS - pthread_atfork.oS - stack_chk_fail_local.oS > But shouldn't the medium model be the GCC default if it is required for > building applications? Small code model can support a 128MiB .text section, and most applications have a .text section < 128MiB. But Firefox libxul.so can be extremely large. It's not worthy to pay the cost everywhere just for satisfying a monster application. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University