diff --git a/bfd/elf.c b/bfd/elf.c index 88c75ae3ce0..8bffd3c5141 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -5789,7 +5789,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, elf_seg_map (abfd) = mfirst; } - if (!elf_modify_segment_map (abfd, info, no_user_phdrs)) + if (!elf_modify_segment_map (abfd, info, no_user_phdrs || info == NULL)) return false; for (count = 0, m = elf_seg_map (abfd); m != NULL; m = m->next)