* elf.c (assign_file_positions_for_segments): Test SEC_ALLOC

rather than SEC_LOAD when aligning the file offset for the first
	section in a segment.
Fixes the case in which . is set just before the .bss section in a
linker script.
This commit is contained in:
Ian Lance Taylor
1996-09-11 15:59:34 +00:00
parent d7deed257c
commit d7775b4355
2 changed files with 7 additions and 1 deletions

View File

@@ -2041,7 +2041,7 @@ assign_file_positions_for_segments (abfd)
if (p->p_type == PT_LOAD
&& m->count > 0
&& (m->sections[0]->flags & SEC_LOAD) != 0)
&& (m->sections[0]->flags & SEC_ALLOC) != 0)
{
if ((abfd->flags & D_PAGED) != 0)
off += (m->sections[0]->vma - off) % bed->maxpagesize;