aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index b7674e3..a82387c 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -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