aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2020-03-04 14:54:27 -0800
committerMax Filippov <jcmvbkbc@gmail.com>2020-03-05 19:48:08 -0800
commite15a8da9c71336b06cb5f2706c3f6b7e6ddd95a3 (patch)
treeee18a44444da1ab1944c7c309050af5622e97e6d /bfd
parenta9b90127e864d0cac1b7b803cb2af4eab01dbdab (diff)
downloadfsf-binutils-gdb-e15a8da9c71336b06cb5f2706c3f6b7e6ddd95a3.zip
fsf-binutils-gdb-e15a8da9c71336b06cb5f2706c3f6b7e6ddd95a3.tar.gz
fsf-binutils-gdb-e15a8da9c71336b06cb5f2706c3f6b7e6ddd95a3.tar.bz2
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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-xtensa.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1cfff1c..838b07f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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:
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 5e31e73..473a9d7 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -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;