PR 33726, symbols in excluded sections

This improves "nearby" section choice when memory regions are active,
preferring a section in the same region as the excluded section over
other sections.

	PR 33726
include/
	* bfdlink.h (struct bfd_link_callbacks): Add nearby_section.
	(_bfd_nearby_section): Delete.
	(bfd_fix_excluded_sec_syms): Rename and remove bfd param from
	_bfd_fix_excluded_sec_syms.
bfd/
	* linker.c (_bfd_nearby_section): Delete.
	(fix_syms): Use linker callback.
	* elflink.c (elf_link_input_bfd): Likewise.
	(_bfd_elf_final_link): Update.
ld/
	* ldemul.c (finish_default): Update.
	* ldlang.c (lang_output_section_get): Delete.
	(ldlang_nearby_section): New function.
	* ldlang.h (ldlang_nearby_section): Declare.
	(lang_output_section_get): New static inline.
	* ldmain.c (link_callbacks): Add ldlang_nearby_section.
7 files changed