[PATCH] ld: Fix segfault in populate_publics_stream
Mark Harmstone
mark@harmstone.com
Sun Nov 27 02:38:39 GMT 2022
---
ld/pdb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ld/pdb.c b/ld/pdb.c
index d133b3e1aaa..42bb1b3a91b 100644
--- a/ld/pdb.c
+++ b/ld/pdb.c
@@ -1413,6 +1413,9 @@ populate_publics_stream (bfd *stream, bfd *abfd, bfd *sym_rec_stream)
for (bfd *in = coff_data (abfd)->link_info->input_bfds; in;
in = in->link.next)
{
+ if (!in->outsymbols)
+ continue;
+
for (unsigned int i = 0; i < in->symcount; i++)
{
struct bfd_symbol *sym = in->outsymbols[i];
--
2.37.4
More information about the Binutils
mailing list