PR26422, ASAN: elf32_arm_final_link_relocate elf32-arm.c:10351

Always reading 32 bits in order to extract addends from instruction
fields is wrong when the field size is smaller.  It also leads to
reading past the end of the section.  This patch tidies that by
reading the proper field size, which allows some later refetching of
addends to disappear.

	PR 26422
	* elf32-arm.c (elf32_arm_final_link_relocate): Use the appropriate
	bfd_get_x size function to read addends out of fields.  Apply
	rightshift adjustment too.  Don't apply the now unnecessary
	howto->size shift to branch REL addends.  Don't refetch R_ARM_ABS8
	and R_ARM_ABS16 addends.  Don't refetch thumb branch addends.
	Correct R_ARM_THM_JUMP6 addend.
2 files changed