elf: Clear the SEC_ALLOC bit for NOLOAD note sections

When generating an ELF output file, if a note section is marked as
NOLOAD, clear the SEC_ALLOC bit so that it won't be treated as an
SHF_ALLOC section, like a .bss style section.

	PR ld/32787
	* ld.texi: Update NOLOAD for ELF output files.
	* ldlang.c (lang_add_section): Clear the SEC_ALLOC bit for NOLOAD
	note sections for ELF output files.
	* testsuite/ld-elf/pr32787.d: New file.
	* testsuite/ld-elf/pr32787.t: Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
4 files changed