aboutsummaryrefslogtreecommitdiff
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/ldgram.y
parentdaily update (diff)
downloadbinutils-gdb-a4f5ad884ecd1b56c973e0d562d97720140d1ec8.tar.gz
binutils-gdb-a4f5ad884ecd1b56c973e0d562d97720140d1ec8.tar.bz2
binutils-gdb-a4f5ad884ecd1b56c973e0d562d97720140d1ec8.zip
* 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/ldgram.y')
-rw-r--r--ld/ldgram.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y
index 75f4e700898..f4f4589327e 100644
--- a/ld/ldgram.y
+++ b/ld/ldgram.y
@@ -808,8 +808,8 @@ exp :
{ $$ = exp_binop(ALIGN_K,$3,$5); }
| DATA_SEGMENT_ALIGN '(' exp ',' exp ')'
{ $$ = exp_binop (DATA_SEGMENT_ALIGN, $3, $5); }
- | DATA_SEGMENT_RELRO_END '(' exp ')'
- { $$ = exp_unop(DATA_SEGMENT_RELRO_END, $3); }
+ | DATA_SEGMENT_RELRO_END '(' exp ',' exp ')'
+ { $$ = exp_binop (DATA_SEGMENT_RELRO_END, $5, $3); }
| DATA_SEGMENT_END '(' exp ')'
{ $$ = exp_unop(DATA_SEGMENT_END, $3); }
| BLOCK '(' exp ')'