[binutils-gdb] Re: tic6x FAIL: ld-elf/pr34550

Alan Modra amodra@sourceware.org
Thu Sep 3 07:11:57 GMT 2026


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

commit 7ce2ad458bfed80640bc9eb2a0450c7391064903
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Sep 3 15:35:43 2026 +0930

    Re: tic6x FAIL: ld-elf/pr34550
    
    In commit ee7896781dc7 I moved a !htab->dynamic_sections_created test
    earlier, thinking "let's do the easy test first".  Bad idea.  We might
    not have an elf hash table, eg. ld-elf/pr21884.  So that test must
    come after verifying the type of hash table (in compatible_format).
    In fact, we might as well let bfd_elf_link_create_dynamic_sections run
    as it will return early if dynamic sections are already created.
    
            * elflink.c (elf_link_add_object_symbols): Don't test for
            dynamic sections already created.

Diff:
---
 bfd/elflink.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/bfd/elflink.c b/bfd/elflink.c
index 172cb439b6b..d5956b8bd2f 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -4633,7 +4633,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
 	 are no input BFD's of the same format as the output, we can't
 	 make a shared library.  */
       if (!just_syms
-	  && !htab->dynamic_sections_created
 	  && (bfd_link_pic (info)
 	      || (!bfd_link_relocatable (info)
 		  && info->nointerp


More information about the Binutils-cvs mailing list