* elf.c (_bfd_elf_map_sections_to_segments): Catch off by one
authorNick Clifton <nickc@redhat.com>
Thu, 24 Jul 2008 07:51:25 +0000 (07:51 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 24 Jul 2008 07:51:25 +0000 (07:51 +0000)
        error assigning sections to segments.

bfd/ChangeLog
bfd/elf.c

index 1b5f018eb9e40bbb3ef756bb00d3e3bf60856173..da58640eac0f042c7c187d394fb37ea011e6b58f 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-24  Nick Clifton  <nickc@redhat.com>
+
+       * elf.c (_bfd_elf_map_sections_to_segments): Catch off by one
+       error assigning sections to segments.
+
 2008-07-22  Nick Clifton  <nickc@redhat.com>
 
        * elf.c (_bfd_elf_map_sections_to_segments): Allow sections in
index a7cc4a596f6a46a686ebe1e13a8c3249f7b68392..e24b04e566c17762d2e28c62812eef92e6797278 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3728,7 +3728,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
          else if ((BFD_ALIGN (last_hdr->lma + last_size, maxpagesize) + maxpagesize
                    > last_hdr->lma)
                   && (BFD_ALIGN (last_hdr->lma + last_size, maxpagesize) + maxpagesize
-                      < hdr->lma))
+                      <= hdr->lma))
            {
              /* If putting this section in this segment would force us to
                 skip a page in the segment, then we need a new segment.  */