aboutsummaryrefslogtreecommitdiff
path: root/ld/ldexp.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-12-17 15:50:02 +0000
committerJakub Jelinek <jakub@redhat.com>2004-12-17 15:50:02 +0000
commite3070fef41863855bd4fcade884cfda11abedb06 (patch)
treea1e4c6daf75abe8a13d92f693f2810602eb754d6 /ld/ldexp.c
parent9d2be1eec8fda466eebb0da7eefdc5b583649ca3 (diff)
downloadbinutils-e3070fef41863855bd4fcade884cfda11abedb06.zip
binutils-e3070fef41863855bd4fcade884cfda11abedb06.tar.gz
binutils-e3070fef41863855bd4fcade884cfda11abedb06.tar.bz2
* ldexp.h (exp_data_seg): Add min_base and maxpagesize fields.
* ldexp.c (fold_binary) <case DATA_SEGMENT_ALIGN>: Initialize them. * ldlang.c (lang_size_sections): Use them to avoid wasting virtual address space at DATA_SEGMENT_ALIGN. Fix computation of expected PT_GNU_RELRO segment end.
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r--ld/ldexp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c
index cd6068c..f971ecf 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -435,8 +435,10 @@ fold_binary (etree_type *tree,
if (allocation_done == lang_allocating_phase_enum)
{
exp_data_seg.phase = exp_dataseg_align_seen;
+ exp_data_seg.min_base = align_n (dot, maxpage);
exp_data_seg.base = result.value;
exp_data_seg.pagesize = other.value;
+ exp_data_seg.maxpagesize = maxpage;
exp_data_seg.relro_end = 0;
}
}