From: Bob Wilson Date: Thu, 4 Nov 2004 00:44:23 +0000 (+0000) Subject: * elf.c (assign_file_positions_for_segments): Set next_file_pos even X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=0ebdbb83125357775c78f6760858084bddfa9939;p=deliverable%2Fbinutils-gdb.git * elf.c (assign_file_positions_for_segments): Set next_file_pos even if there are no segments. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ad485d2a07..93d96e4793 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2004-11-03 Bob Wilson + + * elf.c (assign_file_positions_for_segments): Set next_file_pos even + if there are no segments. + 2004-11-02 Daniel Jacobowitz * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete. diff --git a/bfd/elf.c b/bfd/elf.c index b7674e316e..a82387ca63 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