From: Daniel Jacobowitz Date: Mon, 24 Sep 2007 18:23:13 +0000 (+0000) Subject: * elf.c (assign_file_positions_for_load_sections): Trust X-Git-Tag: insight_6_8-branchpoint~955 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=677b5bd797a12deb2aa9d864b73649460b86a193;p=pf3gnuchains%2Fpf3gnuchains4x.git * elf.c (assign_file_positions_for_load_sections): Trust p_align_valid. (copy_elf_program_header): Copy PT_NULL segments. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 42d91a7afd..c78cf5f029 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2007-09-24 Daniel Jacobowitz + + * elf.c (assign_file_positions_for_load_sections): Trust + p_align_valid. + (copy_elf_program_header): Copy PT_NULL segments. + 2007-09-24 Trevor Smigiel * elf32-spu.c (is_indirect_branch): New function. diff --git a/bfd/elf.c b/bfd/elf.c index 379216e682..3c2a49a1ac 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -4146,10 +4146,10 @@ assign_file_positions_for_load_sections (bfd *abfd, p->p_align = maxpagesize; } - else if (m->count == 0) - p->p_align = 1 << bed->s->log_file_align; else if (m->p_align_valid) p->p_align = m->p_align; + else if (m->count == 0) + p->p_align = 1 << bed->s->log_file_align; else p->p_align = 0; @@ -5666,10 +5666,6 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd) asection *first_section = NULL; asection *lowest_section = NULL; - /* FIXME: Do we need to copy PT_NULL segment? */ - if (segment->p_type == PT_NULL) - continue; - /* Compute how many sections are in this segment. */ for (section = ibfd->sections, section_count = 0; section != NULL;