bfd: xtensa: fix PR ld/25630

bfd/
2020-03-05  Max Filippov  <jcmvbkbc@gmail.com>

	* elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
	relocation sections for any removed reference to a dynamic symbol.
This commit is contained in:
Max Filippov 2020-03-04 14:54:27 -08:00
parent a9b90127e8
commit e15a8da9c7
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2020-03-05 Max Filippov <jcmvbkbc@gmail.com>
* elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
relocation sections for any removed reference to a dynamic symbol.
2020-03-05 Nick Clifton <nickc@redhat.com>
* elf-bfd.h (struct elf_backend_data): Add new fields:

View File

@ -10148,10 +10148,9 @@ shrink_dynamic_reloc_sections (struct bfd_link_info *info,
if ((r_type == R_XTENSA_32 || r_type == R_XTENSA_PLT)
&& (input_section->flags & SEC_ALLOC) != 0
&& (dynamic_symbol || bfd_link_pic (info))
&& (!h || h->root.type != bfd_link_hash_undefweak
|| (dynamic_symbol
&& (bfd_link_dll (info) || info->export_dynamic))))
&& (dynamic_symbol
|| (bfd_link_pic (info)
&& (!h || h->root.type != bfd_link_hash_undefweak))))
{
asection *srel;
bfd_boolean is_plt = FALSE;