[PATCH] LoongArch: Detect relocations out of section range

Alan Modra amodra@gmail.com
Thu Nov 19 21:06:28 GMT 2026


On Thu, Nov 19, 2026 at 08:47:42PM +0800, mengqinggang wrote:
> 	* elfnn-loongarch.c (loongarch_elf_check_relocs): Reject relocations
> 	whose fields are out of the input section range.

This is better done in relocate_section, unless loongarch reads
section contents in check_relocs.  check_relocs is not called for some
sections (see _bfd_elf_link_iterate_on_relocs), so for instance, debug
sections won't have their relocations sanity checked.

-- 
Alan Modra


More information about the Binutils mailing list