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.
This commit is contained in:
parent
ad570dd76c
commit
9cdc5bacdd
3 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2020-09-11 Jeremy Drake <sourceware-bugzilla@jdrake.com>
|
||||
|
||||
PR 26588
|
||||
* emultempl/pe.em (_finish): Only generate a import library if not
|
||||
exporting relocs.
|
||||
* emultempl/pep.em: Likewise.
|
||||
|
||||
2020-09-10 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
|
||||
|
||||
* testsuite/ld-aarch64/emit-relocs-560.d: Expect error instead
|
||||
|
|
|
@ -1996,7 +1996,8 @@ gld_${EMULATION_NAME}_finish (void)
|
|||
)
|
||||
{
|
||||
pe_dll_fill_sections (link_info.output_bfd, &link_info);
|
||||
if (command_line.out_implib_filename)
|
||||
if (command_line.out_implib_filename
|
||||
&& pe_def_file->num_exports != 0)
|
||||
pe_dll_generate_implib (pe_def_file, command_line.out_implib_filename,
|
||||
&link_info);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue