From: H.J. Lu Date: Sun, 15 Oct 2006 14:22:13 +0000 (+0000) Subject: 2006-10-15 H.J. Lu X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f1d3bd6b8bcfdf2ad497a3d50ddab6b55594ada3;p=pf3gnuchains%2Fpf3gnuchains3x.git 2006-10-15 H.J. Lu PR ld/3314 * elf.c (assign_file_positions_for_non_load_sections): Don't page align empty SHF_ALLOC sections. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5310dcdab0..7c8516e080 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2006-10-15 H.J. Lu + + PR ld/3314 + * elf.c (assign_file_positions_for_non_load_sections): Don't + page align empty SHF_ALLOC sections. + 2006-10-13 Jakub Jelinek * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections): Set diff --git a/bfd/elf.c b/bfd/elf.c index ab23a190b9..010a9785b5 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -4665,11 +4665,12 @@ assign_file_positions_for_non_load_sections (bfd *abfd, if (hdr->sh_size != 0) ((*_bfd_error_handler) (_("%B: warning: allocated section `%s' not in segment"), - abfd, - (hdr->bfd_section == NULL - ? "*unknown*" - : hdr->bfd_section->name))); - if ((abfd->flags & D_PAGED) != 0) + abfd, + (hdr->bfd_section == NULL + ? "*unknown*" + : hdr->bfd_section->name))); + /* We don't need to page align empty sections. */ + if ((abfd->flags & D_PAGED) != 0 && hdr->sh_size != 0) off += vma_page_aligned_bias (hdr->sh_addr, off, bed->maxpagesize); else