This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: why Glibc does not build with clang?
- From: David Miller <davem at davemloft dot net>
- To: schwab at linux-m68k dot org
- Cc: dalias at libc dot org, roland at hack dot frob dot com, konstantin dot s dot serebryany at gmail dot com, libc-alpha at sourceware dot org
- Date: Sat, 24 May 2014 13:55:29 -0400 (EDT)
- Subject: Re: why Glibc does not build with clang?
- Authentication-results: sourceware.org; auth=none
- References: <874n0fi6ac dot fsf at igel dot home> <20140524145139 dot GQ507 at brightrain dot aerifal dot cx> <87zji7gnqx dot fsf at igel dot home>
From: Andreas Schwab <schwab@linux-m68k.org>
Date: Sat, 24 May 2014 18:11:50 +0200
> Rich Felker <dalias@libc.org> writes:
>
>> On Sat, May 24, 2014 at 04:46:03PM +0200, Andreas Schwab wrote:
>>> Rich Felker <dalias@libc.org> writes:
>>>
>>> > Nested functions are a feature that fundamentally requires producing
>>> > an insecure executable/library (executable-stack flag)
>>>
>>> Only if you pass the address of it out of the containing function.
>>
>> That's my "_except_ in cases where the compiler optimizes out that
>> need."
>
> That's not the exception, that's the rule. If you never take the
> address of the nested function you never need a trampoline.
Right, the code generator never generates the trampoline.
It's done a code generation time, not in the "optimizers".
There's nothing to "optimize" the code always gets generated
without the trampoline.