From d7775b4355602cddb74fda60b89afb0d8ec8fba4 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 11 Sep 1996 15:59:34 +0000 Subject: * 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. --- bfd/ChangeLog | 6 ++++++ bfd/elf.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'bfd') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 03e9510..09db2fd 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +Wed Sep 11 11:57:56 1996 Ian Lance Taylor + + * 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. + Tue Sep 10 16:18:30 1996 Fred Fish * syms.c (coff_section_type): Make arg const. diff --git a/bfd/elf.c b/bfd/elf.c index 9881ed2..ff4ec3e 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -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; -- cgit v1.1