[PATCH v2] elf: Don't set .note.GNU-stack type to SHT_NOTE
Jan Beulich
jbeulich@suse.com
Wed Jan 14 09:55:35 GMT 2026
On 14.01.2026 10:36, H.J. Lu wrote:
> On Wed, Jan 14, 2026 at 3:52 PM Jan Beulich <jbeulich@suse.com> wrote:
>>> .note.GNU-stack type has been SHT_PROGBITS. According to gABI,
>>> an empty SHT_NOTE section doesn't contribute anything. A linker can
>>> discard an empty SHT_NOTE section.
>>
>> None of this is said in the gABI, though? Or else please provide quotations.
>>
>>> Can someone show benefits of changing .note.GNU-stack to SHT_NOTE?
>>
>> As previously indicated, to have
>>
>> *(.note .note.*)
>>
>> work reliably in linker scripts, without needing to special-case
>> .note.GNU-stack (in the script) and without becoming dependent upon the
>
> Can you add a binutils testcase to show that your patch makes a difference
> for this case?
I can see about doing this, as time permits.
Jan
More information about the Binutils
mailing list