diff options
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/emultempl/pe.em | 3 | ||||
-rw-r--r-- | ld/emultempl/pep.em | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 5cf876a..3692527 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2020-09-30 Jeremy Drake <sourceware-bugzilla@jdrake.com> + + PR 26588 + * emultempl/pe.em (_finish): Generate an import library for DLLs, + even if they have no exports. + * emultempl/pep.em (_finish): Likewise. + 2020-09-28 Alan Modra <amodra@gmail.com> * testsuite/ld-powerpc/tlsget.d, diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 22993c5..00db3d0 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -1997,7 +1997,8 @@ gld_${EMULATION_NAME}_finish (void) { pe_dll_fill_sections (link_info.output_bfd, &link_info); if (command_line.out_implib_filename - && pe_def_file->num_exports != 0) + && (pe_def_file->num_exports != 0 + || bfd_link_pic (&link_info))) pe_dll_generate_implib (pe_def_file, command_line.out_implib_filename, &link_info); } diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index b0a0471..2f4bdfb 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -1824,7 +1824,8 @@ gld_${EMULATION_NAME}_finish (void) { pep_dll_fill_sections (link_info.output_bfd, &link_info); if (command_line.out_implib_filename - && pep_def_file->num_exports != 0) + && (pep_def_file->num_exports != 0 + || bfd_link_pic (&link_info))) pep_dll_generate_implib (pep_def_file, command_line.out_implib_filename, &link_info); } |