[binutils-gdb] bfd: xtensa: fix PR ld/25630

Max Filippov jcmvbkbc@sourceware.org
Fri Mar 6 03:49:00 GMT 2020


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e15a8da9c71336b06cb5f2706c3f6b7e6ddd95a3

commit e15a8da9c71336b06cb5f2706c3f6b7e6ddd95a3
Author: Max Filippov <jcmvbkbc@gmail.com>
Date:   Wed Mar 4 14:54:27 2020 -0800

    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.

Diff:
---
 bfd/ChangeLog      | 5 +++++
 bfd/elf32-xtensa.c | 7 +++----
 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;



More information about the Binutils-cvs mailing list