From: Xi Ruoyao via Libc-alpha <libc-alpha@sourceware.org>
To: Florian Weimer <fweimer@redhat.com>, caiyinyu <caiyinyu@loongson.cn>
Cc: adhemerval.zanella@linaro.org, libc-alpha@sourceware.org,
i.swmail@xen0n.name, xuchenghua@loongson.cn
Subject: Re: [PATCH] LoongArch: Use medium cmodel build libc_nonshared.a.
Date: Wed, 23 Nov 2022 19:18:18 +0800 [thread overview]
Message-ID: <33054b9098f4ef690cd1639e96b2c148e9e9e490.camel@xry111.site> (raw)
In-Reply-To: <87zgcim07m.fsf@oldenburg.str.redhat.com>
On Wed, 2022-11-23 at 11:31 +0100, Florian Weimer wrote:
> > From: Chenghua Xu <xuchenghua@loongson.cn>
> >
> > This patch is used to fix address out-of-bounds error when building
> > firefox.
>
> The .c files shouldn't be necessary. The CFLAGS additions should
> perhaps be made subdirectory-specific. 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.
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
next prev parent reply other threads:[~2022-11-23 11:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 7:09 [PATCH] LoongArch: Use medium cmodel build libc_nonshared.a caiyinyu
2022-11-23 8:21 ` Xi Ruoyao via Libc-alpha
2022-11-23 10:31 ` Florian Weimer via Libc-alpha
2022-11-23 11:18 ` Xi Ruoyao via Libc-alpha [this message]
2022-11-30 6:55 ` 回复: " caiyinyu
[not found] ` <7ffa022e80ba4ab8942995da0d5c8371f180cb1b.camel@xry111.site>
2022-11-30 8:40 ` 回复: 回复: [PATCH] LoongArch: Use mediumcmodel " caiyinyu
2022-11-30 7:40 ` [PATCH] LoongArch: Use medium cmodel " Florian Weimer via Libc-alpha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=33054b9098f4ef690cd1639e96b2c148e9e9e490.camel@xry111.site \
--to=libc-alpha@sourceware.org \
--cc=adhemerval.zanella@linaro.org \
--cc=caiyinyu@loongson.cn \
--cc=fweimer@redhat.com \
--cc=i.swmail@xen0n.name \
--cc=xry111@xry111.site \
--cc=xuchenghua@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).