[binutils-gdb] Fixing linking configure generated tests of ifunc support.

Nick Clifton nickc@sourceware.org
Fri Jun 16 14:17:00 GMT 2017


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

commit 4b48e2f6a50e85e5acc316289c4a6af693ad98f0
Author: Nick Clifton <nickc@redhat.com>
Date:   Fri Jun 16 15:16:19 2017 +0100

    Fixing linking configure generated tests of ifunc support.
    
    	* elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
    	bucketlist is empty because there are no symbols to add to the
    	list.

Diff:
---
 bfd/ChangeLog | 6 ++++++
 bfd/elflink.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8d01021..c51dffc 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2017-06-16  Nick Clifton  <nickc@redhat.com>
+
+	* elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
+	bucketlist is empty because there are no symbols to add to the
+	list.
+
 2017-06-16  Alan Modra  <amodra@gmail.com>
 
 	PR ld/20022
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 1a83b88..e35ec63 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -6940,7 +6940,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info)
 	    = compute_bucket_count (info, hashcodes, nsyms, 0);
 	  free (hashcodes);
 
-	  if (bucketcount == 0)
+	  if (bucketcount == 0 && nsyms > 0)
 	    return FALSE;
 
 	  elf_hash_table (info)->bucketcount = bucketcount;



More information about the Binutils-cvs mailing list