aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-02-28 16:01:04 +0000
committerIan Lance Taylor <ian@airs.com>1996-02-28 16:01:04 +0000
commit0960941513a89c9add07b7922a6141d0849fa7b7 (patch)
tree73505e970913528c5816db5bd102bc4bcf1ebf11
parente24b45a873abefaa0109bc37e439e1a6db849649 (diff)
downloadgdb-0960941513a89c9add07b7922a6141d0849fa7b7.zip
gdb-0960941513a89c9add07b7922a6141d0849fa7b7.tar.gz
gdb-0960941513a89c9add07b7922a6141d0849fa7b7.tar.bz2
* elf.c (assign_file_positions_for_segments): Adjust the segment
memory size for the alignment of a SEC_ALLOC section, not just a SEC_LOAD section.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 20632f9..62b523e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf.c (assign_file_positions_for_segments): Adjust the segment
+ memory size for the alignment of a SEC_ALLOC section, not just a
+ SEC_LOAD section.
+
Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* m68klinux.c: New file.
diff --git a/bfd/elf.c b/bfd/elf.c
index eab15b0..8221561 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2070,7 +2070,7 @@ assign_file_positions_for_segments (abfd)
/* The section VMA must equal the file position modulo
the page size. */
- if ((flags & SEC_LOAD) != 0)
+ if ((flags & SEC_ALLOC) != 0)
{
adjust = (sec->vma - off) % bed->maxpagesize;
if (adjust != 0)
@@ -2079,8 +2079,10 @@ assign_file_positions_for_segments (abfd)
abort ();
p->p_memsz += adjust;
if ((flags & SEC_LOAD) != 0)
- p->p_filesz += adjust;
- off += adjust;
+ {
+ p->p_filesz += adjust;
+ off += adjust;
+ }
}
}