2 2006-10-06 H.J. Lu <hongjiu.lu@intel.com>
5 * elf.c (assign_file_positions_for_non_load_sections): Don't
6 page align empty SHF_ALLOC sections.
8 --- bfd/elf.c.empty 2006-09-29 09:00:21.000000000 -0700
9 +++ bfd/elf.c 2006-10-06 09:14:04.000000000 -0700
10 @@ -4663,11 +4663,12 @@ assign_file_positions_for_non_load_secti
11 if (hdr->sh_size != 0)
12 ((*_bfd_error_handler)
13 (_("%B: warning: allocated section `%s' not in segment"),
15 - (hdr->bfd_section == NULL
17 - : hdr->bfd_section->name)));
18 - if ((abfd->flags & D_PAGED) != 0)
20 + (hdr->bfd_section == NULL
22 + : hdr->bfd_section->name)));
23 + /* We don't need to page align empty sections. */
24 + if ((abfd->flags & D_PAGED) != 0 && hdr->sh_size != 0)
25 off += vma_page_aligned_bias (hdr->sh_addr, off,