* elf.c (map_sections_to_segments): Correct test for start of
authorAlan Modra <amodra@gmail.com>
Sat, 28 Sep 2002 03:25:56 +0000 (03:25 +0000)
committerAlan Modra <amodra@gmail.com>
Sat, 28 Sep 2002 03:25:56 +0000 (03:25 +0000)
writable section in the same page as end of read-only section.

bfd/ChangeLog
bfd/elf.c

index a78f22406b7fe1a23c3f261e3ff463460e60f00d..ed2e0162613edcc204417200192c3ee2c7763103 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-28  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf.c (map_sections_to_segments): Correct test for start of
+       writable section in the same page as end of read-only section.
+
 2002-09-27  Matt Thomas  <matt@3am-software.com>
 
        * elf32-vax.c (elf_vax_check_relocs): Remove unused
index b8a300e4a64ae13cc1954d1cc2236e53f1332082..c1e2d118071e25c92919e180b627a680b7d249d6 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3317,8 +3317,9 @@ map_sections_to_segments (abfd)
        }
       else if (! writable
               && (hdr->flags & SEC_READONLY) == 0
-              && (BFD_ALIGN (last_hdr->lma + last_hdr->_raw_size, maxpagesize)
-                  == hdr->lma))
+              && (((last_hdr->lma + last_hdr->_raw_size - 1)
+                   & ~(maxpagesize - 1))
+                  != (hdr->lma & ~(maxpagesize - 1))))
        {
          /* We don't want to put a writable section in a read only
              segment, unless they are on the same page in memory
This page took 0.040059 seconds and 4 git commands to generate.