From: Prakhar Bahuguna <prakhar.bahuguna@arm.com>
To: "Hans-Bernhard Bröker" <HBBroeker@t-online.de>
Cc: <newlib@sourceware.org>, <nd@arm.com>
Subject: Re: Memory usage of __global_locale for non-locale functions
Date: Tue, 30 May 2017 08:17:00 -0000 [thread overview]
Message-ID: <20170530081733.4kzy7gbosarv5oaj@e107464-lin.cambridge.arm.com> (raw)
In-Reply-To: <bf3a89d1-bc7e-7c75-729a-617b0dc401fb@t-online.de>
On 26/05/2017 19:52:10, Hans-Bernhard Bröker wrote:
> Am 26.05.2017 um 15:31 schrieb Prakhar Bahuguna:
>
> > We've noticed that since a series of patches to add support for POSIX-1.2008
> > per-thread locales in August 2015, the size of the .data section in binaries
> > produced by our toolchain has increased significantly due to the
> > __global_locale struct in lib_a-locale.o. This is linked in when any strto*()
> > function is called. This is true even for non-locale functions such as
> > strtoul().
>
> Your classification of stroul() as a non-locale function is wrong.
>
> This general issue has come up before, quite recently:
>
> https://sourceware.org/ml/newlib/2017/msg00192.html
>
> The answer for you is the same as it was then: a library that does support
> setlocale at all has little chance but to pull in the required machinery as
> soon as any of the localized standard library functions (or macros) is
> referred to by the program.
>
> And no, I don't think there's a configure-time option to disable locale
> altogether.
>
Hello,
Thank you for the explanation. In this case, I believe we will have to simply
accept the increase in code size.
--
Prakhar Bahuguna
prev parent reply other threads:[~2017-05-30 8:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 13:31 Prakhar Bahuguna
2017-05-26 17:52 ` Hans-Bernhard Bröker
2017-05-30 8:17 ` Prakhar Bahuguna [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170530081733.4kzy7gbosarv5oaj@e107464-lin.cambridge.arm.com \
--to=prakhar.bahuguna@arm.com \
--cc=HBBroeker@t-online.de \
--cc=nd@arm.com \
--cc=newlib@sourceware.org \
/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).