From: musl <b.brezillon.musl@gmail.com>
To: musl@lists.openwall.com
Subject: Re: TLS (thread-local storage) support
Date: Wed, 17 Oct 2012 09:48:56 +0200 [thread overview]
Message-ID: <507E62E8.9080601@gmail.com> (raw)
In-Reply-To: <20121017015842.GX254@brightrain.aerifal.cx>
On 17/10/2012 03:58, Rich Felker wrote:
> On Wed, Oct 17, 2012 at 03:49:33AM +0200, boris brezillon wrote:
>> 2012/10/17 Rich Felker <dalias@aerifal.cx>:
>>> On Wed, Oct 17, 2012 at 02:08:11AM +0200, boris brezillon wrote:
>>>>>> I agree. This should be made optional. But if we don't compile libc
>>>>>> with fsplit-stack (-fnosplit-stack).
>>>>>> Each call to a libc func from an external func compiled with split
>>>>>> stack may lead to a 64K stack chunk alloc.
>>>>> Where does this allocation take place from? There should simply be a
>>>>> way to inhibit it.
>>>> In the linker (gold linker).
>>> Well gold isn't running at runtime. I assume you mean it _arranges_
>>> for this allocation to take place somehow, and that's what I'm
>>> wondering about whether there's a way to avoid.
>> The easiest way to avoid big stack chunk allocation is to compile musl
>> with -fno-split-stack option.
>> This will not add any overhead to functions (no split stack prolog)
>> And this will add a note to the shared object which tells the linker
>> to avoid __morestack to __morestack_non_split replacement.
> Where is this documented? The GCC manual doesn't mention anything
> about -fno-split-stack having special behavior like that, so for lack
> of any documentation otherwise, it "should" just be the option to turn
> off -fsplit-stack..
You're right, I misunderstood how -fno-split-stack was implemented.
I tried to compile a source file with -fno-split-stack and didn't find any 'no-split-stack' note in the generated object
file.
When I compile it with -fsplit-stack both 'no-split-stack' and 'split-stack' notes are added.
>
> I'm not claiming you're wrong, just that this all seems poorly
> documented.
>
> Rich
next prev parent reply other threads:[~2012-10-17 7:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-04 21:13 Rich Felker
2012-10-04 21:29 ` Daniel Cegiełka
2012-10-04 22:36 ` Rich Felker
2012-10-06 8:17 ` Daniel Cegiełka
2012-10-16 21:27 ` boris brezillon
2012-10-16 21:47 ` boris brezillon
2012-10-16 22:09 ` Szabolcs Nagy
2012-10-16 23:16 ` boris brezillon
2012-10-17 10:37 ` Szabolcs Nagy
2012-10-16 23:29 ` Rich Felker
2012-10-16 22:54 ` Rich Felker
2012-10-16 23:39 ` boris brezillon
2012-10-16 23:48 ` Rich Felker
2012-10-17 0:08 ` boris brezillon
2012-10-17 0:42 ` Rich Felker
2012-10-17 1:03 ` boris brezillon
2012-10-17 1:49 ` boris brezillon
2012-10-17 1:58 ` Rich Felker
2012-10-17 7:48 ` musl [this message]
2012-10-19 18:39 ` orc
2012-10-19 18:41 ` Rich Felker
2012-10-05 3:04 ` Rich Felker
2012-10-05 17:27 ` Rich Felker
2012-10-06 14:33 ` Szabolcs Nagy
2012-10-06 20:39 ` Szabolcs Nagy
2012-10-06 20:58 ` Rich Felker
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=507E62E8.9080601@gmail.com \
--to=b.brezillon.musl@gmail.com \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).