diff options
author | Jeremy Drake <sourceware-bugzilla@jdrake.com> | 2020-09-11 17:51:16 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-09-11 17:51:16 +0100 |
commit | 9cdc5bacddc3776a455cc918e034b01dfb31c75b (patch) | |
tree | aeef3c49bbbd8d634aa5066575016f04717ff084 /ld/emultempl/pep.em | |
parent | ad570dd76c3578bc5aaae0c2029ff43fd40ef9cd (diff) | |
download | binutils-9cdc5bacddc3776a455cc918e034b01dfb31c75b.zip binutils-9cdc5bacddc3776a455cc918e034b01dfb31c75b.tar.gz binutils-9cdc5bacddc3776a455cc918e034b01dfb31c75b.tar.bz2 |
Fix a segfault when creating an import library with 0 exports.
PR 26588
* emultempl/pe.em (_finish): Only generate a import library if not
exporting relocs.
* emultempl/pep.em: Likewise.
Diffstat (limited to 'ld/emultempl/pep.em')
-rw-r--r-- | ld/emultempl/pep.em | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index 7d93951..f161cce 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -1823,7 +1823,8 @@ gld_${EMULATION_NAME}_finish (void) && pep_def_file->num_exports != 0)) { pep_dll_fill_sections (link_info.output_bfd, &link_info); - if (command_line.out_implib_filename) + if (command_line.out_implib_filename + && pep_def_file->num_exports != 0) pep_dll_generate_implib (pep_def_file, command_line.out_implib_filename, &link_info); } |