diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-10-04 13:41:15 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-10-04 13:41:15 +0000 |
commit | a4f5ad884ecd1b56c973e0d562d97720140d1ec8 (patch) | |
tree | 53f1cb3832ca29707b8bacd44f9ff14538fbbbce /ld/scripttempl/elf.sc | |
parent | daab19f765f12cce4c9f73efaff8b8ba75a139b5 (diff) | |
download | gdb-a4f5ad884ecd1b56c973e0d562d97720140d1ec8.zip gdb-a4f5ad884ecd1b56c973e0d562d97720140d1ec8.tar.gz gdb-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/scripttempl/elf.sc')
-rw-r--r-- | ld/scripttempl/elf.sc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 245ab03..d560f58 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -90,9 +90,9 @@ if test -n "${COMMONPAGESIZE}"; then DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})" DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);" if test -n "${SEPARATE_GOTPLT}"; then - DATA_SEGMENT_RELRO_GOTPLT_END=". = DATA_SEGMENT_RELRO_END (. + ${SEPARATE_GOTPLT});" + DATA_SEGMENT_RELRO_GOTPLT_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT}, .);" else - DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (.);" + DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (0, .);" fi fi INTERP=".interp ${RELOCATING-0} : { *(.interp) }" @@ -102,7 +102,8 @@ if test -z "$GOT"; then GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }" else GOT=".got ${RELOCATING-0} : { *(.got) }" - GOTPLT=".got.plt ${RELOCATING-0} : { ${RELOCATING+${DATA_SEGMENT_RELRO_GOTPLT_END}} *(.got.plt) }" + GOTPLT="${RELOCATING+${DATA_SEGMENT_RELRO_GOTPLT_END}} + .got.plt ${RELOCATING-0} : { *(.got.plt) }" fi fi DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" |