PR 33676 ld segfaults when using binary input inside NOLOAD

The code at ldlang.c:2840-2841 checks if the output BFD is ELF format,
then unconditionally uses elf_section_type() on the input section
without verifying the input section is also ELF format.

This was introduced in commit d87be451e (PR ld/32787) which added
special handling for NOLOAD note sections.

	PR 33676
	PR 32787
	* ldlang.c (lang_add_section): Check section owner's BFD
	flavour before using elf_section_type.
1 file changed