why Glibc does not build with clang?
pinskia@gmail.com
pinskia@gmail.com
Sat May 24 16:39:00 GMT 2014
> On May 24, 2014, at 9:11 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> 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.
Andreas is correct, trampolines are never generated unless you take the address of a nested function. It is not an optimization as it never generated to begin with. Also some abi don't need a trampoline: PPC64v1 for an example.
Thanks,
Andrew
>
> Andreas.
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
More information about the Libc-alpha
mailing list