aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-09-11 15:59:34 +0000
committerIan Lance Taylor <ian@airs.com>1996-09-11 15:59:34 +0000
commitd7775b4355602cddb74fda60b89afb0d8ec8fba4 (patch)
tree96484437f6af26e21103b919026407cbaef4eda3 /bfd/elf.c
parentd7deed257c71d65d39d2d93797b3f87b678e95b7 (diff)
downloadgdb-d7775b4355602cddb74fda60b89afb0d8ec8fba4.zip
gdb-d7775b4355602cddb74fda60b89afb0d8ec8fba4.tar.gz
gdb-d7775b4355602cddb74fda60b89afb0d8ec8fba4.tar.bz2
* 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.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c2
1 files changed, 1 insertions, 1 deletions
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;