aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-10-04 13:41:15 +0000
committerJakub Jelinek <jakub@redhat.com>2004-10-04 13:41:15 +0000
commita4f5ad884ecd1b56c973e0d562d97720140d1ec8 (patch)
tree53f1cb3832ca29707b8bacd44f9ff14538fbbbce /ld/ld.texinfo
parentdaab19f765f12cce4c9f73efaff8b8ba75a139b5 (diff)
downloadbinutils-a4f5ad884ecd1b56c973e0d562d97720140d1ec8.zip
binutils-a4f5ad884ecd1b56c973e0d562d97720140d1ec8.tar.gz
binutils-a4f5ad884ecd1b56c973e0d562d97720140d1ec8.tar.bz2
* ldgram.y (DATA_SEGMENT_RELRO_END): Add one argument.
* scripttempl/elf.sc (DATA_SEGMENT_RELRO_END): Add 0 as first argument. (DATA_SEGMENT_RELRO_GOTPLT_END): Pass $SEPARATE_GOTPLT as first and . as second argument. (GOTPLT): Move $DATA_SEGMENT_RELRO_GOTPLT_END before the section. * ldexp.c (fold_unary): Remove DATA_SEGMENT_RELRO_END handling here. (fold_binary): Add it here. Insert padding to make relro_end COMMONPAGESIZE bytes aligned. For DATA_SEGMENT_ALIGN in exp_dataseg_relro_adjust phase just use previously computed exp_data_seg.base. * ldlang.c (lang_size_sections): Set exp_data_seg.base for relro_adjust here. Call lang_size_sections_1 once more if there was too big padding at DATA_SEGMENT_RELRO_END. * ld.texinfo (DATA_SEGMENT_RELRO_END): Add documentation.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo15
1 files changed, 15 insertions, 0 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 047933a..10134a6 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -4545,6 +4545,21 @@ evaluation purposes.
. = DATA_SEGMENT_END(.);
@end smallexample
+@item DATA_SEGMENT_RELRO_END(@var{offset}, @var{exp})
+@kindex DATA_SEGMENT_RELRO_END(@var{offset}, @var{exp})
+This defines the end of the @code{PT_GNU_RELRO} segment when
+@samp{-z relro} option is used. Second argument is returned.
+When @samp{-z relro} option is not present, @code{DATA_SEGMENT_RELRO_END}
+does nothing, otherwise @code{DATA_SEGMENT_ALIGN} is padded so that
+@var{exp} + @var{offset} is aligned to the most commonly used page
+boundary for particular target. If present in the linker script,
+it must always come in between @code{DATA_SEGMENT_ALIGN} and
+@code{DATA_SEGMENT_END}.
+
+@smallexample
+ . = DATA_SEGMENT_RELRO_END(24, .);
+@end smallexample
+
@item DEFINED(@var{symbol})
@kindex DEFINED(@var{symbol})
@cindex symbol defaults