diff options
author | Alan Modra <amodra@gmail.com> | 2012-03-23 09:34:57 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2012-03-23 09:34:57 +0000 |
commit | e8d2ba535407a21e3180c8a53fd1f4492450d383 (patch) | |
tree | fd3c59b2bda580f50f3562b83789d20b17e23720 | |
parent | 051d833a41cabf1bcc879756756901deb6b1c448 (diff) | |
download | gdb-e8d2ba535407a21e3180c8a53fd1f4492450d383.zip gdb-e8d2ba535407a21e3180c8a53fd1f4492450d383.tar.gz gdb-e8d2ba535407a21e3180c8a53fd1f4492450d383.tar.bz2 |
* elf.c (assign_file_positions_for_non_load_sections): Don't warn
on empty alloc sections.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf.c | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c59bb4c..04c3b31 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2012-03-23 Alan Modra <amodra@gmail.com> + * elf.c (assign_file_positions_for_non_load_sections): Don't warn + on empty alloc sections. + +2012-03-23 Alan Modra <amodra@gmail.com> + * linker.c (_bfd_nearby_section): New function, split out from.. (fix_syms): ..here. * bfd-in.h (_bfd_nearby_section): Declare. @@ -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, |