This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Fix -z relro
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com, drepper at redhat dot com
- Date: Wed, 22 Sep 2004 18:50:31 +0930
- Subject: Re: [PATCH] Fix -z relro
- References: <20040920112446.GL30497@sunsite.ms.mff.cuni.cz>
On Mon, Sep 20, 2004 at 01:24:46PM +0200, Jakub Jelinek wrote:
> * 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.
OK. Please add a description of DATA_SEGMENT_RELRO_END to ld.texinfo.
--
Alan Modra
IBM OzLabs - Linux Technology Centre