* elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
authorIan Lance Taylor <ian@airs.com>
Wed, 11 Sep 1996 15:59:34 +0000 (15:59 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 11 Sep 1996 15:59:34 +0000 (15:59 +0000)
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
bfd/elf.c

index 03e95105fb314807012f9d3067008c77dd89c80a..09db2fd9257404c24548c9a21452e1b371860fa9 100644 (file)
@@ -1,3 +1,9 @@
+Wed Sep 11 11:57:56 1996  Ian Lance Taylor  <ian@cygnus.com>
+
+       * 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  <fnf@cygnus.com>
 
        * syms.c (coff_section_type): Make arg const.
index 9881ed242d0b549a61523688bc65fb72a73bc538..ff4ec3e2916051af6b0a2b01261c1f2179f12ce4 100644 (file)
--- 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;
This page took 0.031983 seconds and 4 git commands to generate.