diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 41d511948af..f238d864717 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2017-01-04 James Clarke + + * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free + if relocs are cached. + 2017-01-03 Rich Felker PR ld/21017 diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 4fa47437668..b4a50f4e777 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -3215,7 +3215,9 @@ elf64_alpha_relax_opt_call (struct alpha_relax_info *info, bfd_vma symval) if (tsec_relocs == NULL) return 0; tsec_relend = tsec_relocs + info->tsec->reloc_count; - tsec_free = (info->link_info->keep_memory ? NULL : tsec_relocs); + tsec_free = (elf_section_data (info->tsec)->relocs == tsec_relocs + ? NULL + : tsec_relocs); } /* Recover the symbol's offset within the section. */