From: Andreas Schwab Date: Sun, 19 Sep 2004 17:09:23 +0000 (+0000) Subject: * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Adjust data segment X-Git-Tag: csl-arm-2004-q3~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2a68bcce6a3422a18c05258c512047a1ce01d70;p=thirdparty%2Fbinutils-gdb.git * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Adjust data segment base so that relro end is suitably aligned. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index a267b23e963..2d4df31c6b0 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2004-09-19 Andreas Schwab + + * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Adjust data segment + base so that relro end is suitably aligned. + 2004-09-17 Paul Brook * ld.texinfo: Rename arm-specific section. Document --target* diff --git a/ld/ldexp.c b/ld/ldexp.c index 217a702edf2..de239b22521 100644 --- a/ld/ldexp.c +++ b/ld/ldexp.c @@ -425,12 +425,9 @@ fold_binary (etree_type *tree, { /* Attempt to align DATA_SEGMENT_RELRO_END at a common page boundary. */ - bfd_vma relro; - - result.value += dot & (maxpage - 1); - relro = exp_data_seg.relro_end - exp_data_seg.base; - result.value += -relro & (other.value - 1); - exp_data_seg.base = result.value; + exp_data_seg.base += (-exp_data_seg.relro_end + & (other.value - 1)); + result.value = exp_data_seg.base; } else if (exp_data_seg.phase != exp_dataseg_adjust) {