From e8d2ba535407a21e3180c8a53fd1f4492450d383 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 23 Mar 2012 09:34:57 +0000 Subject: * elf.c (assign_file_positions_for_non_load_sections): Don't warn on empty alloc sections. --- bfd/elf.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'bfd/elf.c') diff --git a/bfd/elf.c b/bfd/elf.c index 5aabeeb..df43a6a 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -4820,12 +4820,13 @@ assign_file_positions_for_non_load_sections (bfd *abfd, BFD_ASSERT (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)); /* 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, -- cgit v1.1