Removing nested function from elfxx-aarch64.c

Nick Clifton nickc@redhat.com
Fri Mar 7 10:30:59 GMT 2025


Hi Eric,

>> The second is that they can lead to the creation of an
>> executable stack.  This second problem usually only happens if you
>> take the address of a nested function, but there are some older
>> compilers where the stack was always used.
> 
> Curious about the latter part of the sentence.  Do you have any reference?

Darn.  I knew that someone would bring me up on this.

The short answer is "no".  The longer answer is that I have in mind old
versions of gcc, probably when the support for nested functions had only
recently been added, where an executable stack was always used, even when
it was not strictly necessary.  Now I may be mis-remembering here and
blaming gcc incorrectly, but I that is what I had in mind when I wrote that
sentence.

Anyway, whilst nested functions are nice, they do present a problem
when trying to compile the binutils sources with a compiler other than gcc,
and so I think that we should not be using them.

Cheers
   Nick




More information about the Binutils mailing list