Fix relro when COMMONPAGESIZE < MAXPAGESIZE
Andreas Schwab
schwab@suse.de
Thu Sep 2 15:39:00 GMT 2004
Adjusting the relro end address during DATA_SEGMENT_ALIGN throws aways any
previous data segment alignment, causing the resulting binary to contain a
big hole.
Andreas.
2004-09-02 Andreas Schwab <schwab@suse.de>
* ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Apply data segment
alignment before adjusting DATA_SEGMENT_RELRO_END.
--- ld/ldexp.c 18 Aug 2004 11:08:48 +0200 1.32
+++ ld/ldexp.c 02 Sep 2004 15:29:34 +0200
@@ -427,6 +427,7 @@ fold_binary (etree_type *tree,
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;
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Binutils
mailing list