+2020-08-26 Alan Modra <amodra@gmail.com>
+
+ PR 26431
+ * pe-dll.c (auto_export): Don't call bsearch with zero count.
+
2020-08-25 Alan Modra <amodra@gmail.com>
* testsuite/ld-libs/libs.exp: Don't run on sh-pe, tic30 or tic54x.
key.name = key.its_name = (char *) n;
/* Return false if n is in the d->exports table. */
- if (bsearch (&key, d->exports, d->num_exports,
- sizeof (pe_def_file->exports[0]), pe_export_sort))
+ if (d->num_exports != 0
+ && bsearch (&key, d->exports, d->num_exports,
+ sizeof (pe_def_file->exports[0]), pe_export_sort))
return 0;
if (pe_dll_do_default_excludes)