Fixing linking configure generated tests of ifunc support.
authorNick Clifton <nickc@redhat.com>
Fri, 16 Jun 2017 14:16:19 +0000 (15:16 +0100)
committerNick Clifton <nickc@redhat.com>
Fri, 16 Jun 2017 14:16:19 +0000 (15:16 +0100)
* 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.

bfd/ChangeLog
bfd/elflink.c

index 8d01021ffd4f233dacb8c7d8bf0ecc4c9ffffc91..c51dffc1dd1a02c8c4d286e438808d223dc18d93 100644 (file)
@@ -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
index 1a83b88be08018835508930a3a66c523ed398db4..e35ec630a24008c57e4e90a49ed9438d4288e409 100644 (file)
@@ -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;