diff options
author | Alan Modra <amodra@gmail.com> | 2002-09-28 03:25:56 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-09-28 03:25:56 +0000 |
commit | b89fe0ee4b061b9150fd2ae60800a589ffd163f3 (patch) | |
tree | 054156cfcda1ccacf11353f6c1b3e58db474ea95 /bfd/elf.c | |
parent | c02920230d7a57be634572745978d819a33bea1e (diff) | |
download | gdb-b89fe0ee4b061b9150fd2ae60800a589ffd163f3.zip gdb-b89fe0ee4b061b9150fd2ae60800a589ffd163f3.tar.gz gdb-b89fe0ee4b061b9150fd2ae60800a589ffd163f3.tar.bz2 |
* elf.c (map_sections_to_segments): Correct test for start of
writable section in the same page as end of read-only section.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |