diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2006-10-15 14:22:13 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2006-10-15 14:22:13 +0000 |
commit | 3ba71138787fe166f749fb847368721cf09e9a10 (patch) | |
tree | 3837b3729db10ca58edd1ce508cc1f4e28cb326c /bfd | |
parent | 706bae0be610f7faee2787c9dd359e15e086182c (diff) | |
download | gdb-3ba71138787fe166f749fb847368721cf09e9a10.zip gdb-3ba71138787fe166f749fb847368721cf09e9a10.tar.gz gdb-3ba71138787fe166f749fb847368721cf09e9a10.tar.bz2 |
2006-10-15 H.J. Lu <hongjiu.lu@intel.com>
PR ld/3314
* elf.c (assign_file_positions_for_non_load_sections): Don't
page align empty SHF_ALLOC sections.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf.c | 11 |
2 files changed, 12 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5310dcd..7c8516e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2006-10-15 H.J. Lu <hongjiu.lu@intel.com> + + 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 <jakub@redhat.com> * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections): Set @@ -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 |