* elf.c (assign_file_positions_for_segments): Set next_file_pos even

if there are no segments.
This commit is contained in:
Bob Wilson
2004-11-04 00:44:23 +00:00
parent 9f0b03222a
commit 0ebdbb8312
2 changed files with 9 additions and 1 deletions

View File

@@ -3871,7 +3871,10 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
elf_elfheader (abfd)->e_phnum = count;
if (count == 0)
return TRUE;
{
elf_tdata (abfd)->next_file_pos = bed->s->sizeof_ehdr;
return TRUE;
}
/* If we already counted the number of program segments, make sure
that we allocated enough space. This happens when SIZEOF_HEADERS