From 3da64fe404031c093e8b59565d935fed214e28c1 Mon Sep 17 00:00:00 2001 From: Rafeal Auler Date: Wed, 22 Aug 2018 10:04:09 +0100 Subject: 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. --- bfd/ChangeLog | 6 ++++++ bfd/elfnn-aarch64.c | 3 +++ 2 files changed, 9 insertions(+) (limited to 'bfd') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6eac668..6946a65 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2018-08-22 Rafeal Auler + + 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 * elf32-s12z.c (opru18_reloc): New function. diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 8681444..ee09cd7 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -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; } -- cgit v1.1