aboutsummaryrefslogtreecommitdiff
path: root/ld/ldexp.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-04-03 10:25:41 +0000
committerJakub Jelinek <jakub@redhat.com>2002-04-03 10:25:41 +0000
commit50e60fb5787f9df6a34bfef4ecf7eb28c28acb74 (patch)
treee57eb7e70ee80f77d4ed4e6d22dbf19b474190f7 /ld/ldexp.c
parent784b640dd592bb5c3344872a89d91e2f93a54b82 (diff)
downloadgdb-50e60fb5787f9df6a34bfef4ecf7eb28c28acb74.zip
gdb-50e60fb5787f9df6a34bfef4ecf7eb28c28acb74.tar.gz
gdb-50e60fb5787f9df6a34bfef4ecf7eb28c28acb74.tar.bz2
* ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: If common page size
is smaller than maximum, round dot up to common page boundary.
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r--ld/ldexp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c
index 903374e..c4876a8 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -356,7 +356,8 @@ fold_binary (tree, current_section, allocation_done, dot, dotp)
}
}
else if (other.value < maxpage)
- result.value += dot & (maxpage - other.value);
+ result.value += (dot + other.value - 1)
+ & (maxpage - other.value);
}
else
result.valid_p = false;