aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf.c13
2 files changed, 14 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e8bf78b..a241894 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3223
+ PR ld/3267
+ * elf.c (assign_file_positions_for_non_load_sections): Don't
+ warn zero size allocated sections.
+
2006-09-27 Alan Modra <amodra@bigpond.net.au>
* elf32-score.c (_bfd_score_elf_relocate_section): Move assignment
diff --git a/bfd/elf.c b/bfd/elf.c
index 87c3cc7..ab23a19 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -4662,12 +4662,13 @@ assign_file_positions_for_non_load_sections (bfd *abfd,
hdr->sh_offset = hdr->bfd_section->filepos;
else if ((hdr->sh_flags & SHF_ALLOC) != 0)
{
- ((*_bfd_error_handler)
- (_("%B: warning: allocated section `%s' not in segment"),
- abfd,
- (hdr->bfd_section == NULL
- ? "*unknown*"
- : hdr->bfd_section->name)));
+ 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)
off += vma_page_aligned_bias (hdr->sh_addr, off,
bed->maxpagesize);