Removing nested function from elfxx-aarch64.c

Eric Botcazou botcazou@adacore.com
Fri Mar 7 20:09:59 GMT 2025


> 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.

I see, thanks.  My experience is that GCC versions released over the last 
couple of decades behave as expected, in other words they do *not* require an 
executable stack unless a pointer to a nested function is taken (and a quick 
test with GCC 3.4.6 confirms it in a simple case).

> 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.

No disagreement here, this feature is definitely not portable.

-- 
Eric Botcazou




More information about the Binutils mailing list