Fix AArch64 stub layout algorithm to allow for the fact that section layut might change a stub's target location.

PR 23560
	* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
	stub's target, since it may have been changed after the layout.
This commit is contained in:
Rafeal Auler 2018-08-22 10:04:09 +01:00 committed by Nick Clifton
parent d000b7630e
commit 3da64fe404
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2018-08-22 Rafeal Auler <rafaelauler@gmail.com>
PR 23560
* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
stub's target, since it may have been changed after the layout.
2018-08-21 John Darington <john@darrington.wattle.id.au>
* elf32-s12z.c (opru18_reloc): New function.

View File

@ -4414,6 +4414,9 @@ elfNN_aarch64_size_stubs (bfd *output_bfd,
{
/* The proper stub has already been created. */
free (stub_name);
/* Always update this stub's target since it may have
changed after layout. */
stub_entry->target_value = sym_value + irela->r_addend;
continue;
}