mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-29 21:13:52 +08:00
* elf.c (assign_file_positions_for_non_load_sections): Don't warn
on empty alloc sections.
This commit is contained in:
parent
051d833a41
commit
e8d2ba5354
@ -1,3 +1,8 @@
|
||||
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..
|
||||
|
13
bfd/elf.c
13
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,
|
||||
|
Loading…
Reference in New Issue
Block a user