Fix seg-fault when generating an empty DLL with LTO enabled.
authorNick Clifton <nickc@redhat.com>
Tue, 24 Jan 2023 09:47:43 +0000 (09:47 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 24 Jan 2023 09:47:43 +0000 (09:47 +0000)
commitf3d8ae90b23695d86ebf894a4a6b95846007fafd
tree7ae978b19ab2400f82a8d1b009b580b84462af45
parent59d49a8d83a289624a1dff4e8833f2b7c286d764
Fix seg-fault when generating an empty DLL with LTO enabled.

ld   PR 29998
     * pe-dll.c (generate_reloc): Handle sections
     with no assigned output section.
     Terminate early of there are no relocs to put
     in the .reloc section.
     (pe_exe_fill_sections): Do not emit an empty
     .reloc section.

bfd  * cofflink.c (_bfd_coff_generic_relocate_section):
     Add an assertion that the output section is set
     for defined, global symbols.
bfd/ChangeLog
bfd/cofflink.c
ld/ChangeLog
ld/pe-dll.c