This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Reduce file size for PT_GNU_RELRO segment
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Mon, 30 Mar 2015 09:12:12 -0700
- Subject: Re: [PATCH] Reduce file size for PT_GNU_RELRO segment
- Authentication-results: sourceware.org; auth=none
- References: <20150319130244 dot GA22592 at intel dot com> <20150326022246 dot GU26234 at bubble dot grove dot modra dot org> <CAMe9rOrVpthhMfZEXcMkKzmHcxymfQHKuTuZPi_y36=s6KJ9iA at mail dot gmail dot com> <20150328041540 dot GE26234 at bubble dot grove dot modra dot org> <CAMe9rOoVzbOvdE1_apgUbHtm0gG89d3_9qbnA8=Y3Qu9MznUPA at mail dot gmail dot com> <CAMe9rOp8sdCbOp0eVzRmwMhe_3c2K0EJ6fmnMMWyA01KYamzLw at mail dot gmail dot com> <20150329034858 dot GH26234 at bubble dot grove dot modra dot org> <CAMe9rOrJB7xNLn4FEq5+N8VbnfZuYxkM4tPNMQzOKapVheGOpQ at mail dot gmail dot com> <20150330123934 dot GJ26234 at bubble dot grove dot modra dot org> <CAMe9rOrXQJmjNR4ynGD9BQJz5T8OygQekoLVsmubpFva1ff45w at mail dot gmail dot com> <20150330141433 dot GL26234 at bubble dot grove dot modra dot org>
On Mon, Mar 30, 2015 at 7:14 AM, Alan Modra <amodra@gmail.com> wrote:
> On Mon, Mar 30, 2015 at 06:00:20AM -0700, H.J. Lu wrote:
>> On Mon, Mar 30, 2015 at 5:39 AM, Alan Modra <amodra@gmail.com> wrote:
>> > On Sun, Mar 29, 2015 at 06:58:45AM -0700, H.J. Lu wrote:
>> >> On Sat, Mar 28, 2015 at 8:48 PM, Alan Modra <amodra@gmail.com> wrote:
>> >> > lang_size_sections). I think it important that we keep the relro base
>> >> > alignment code all in one place.
>> >>
>> >> It is not about the base alignment. It is about setting the address of
>> >> the first section in PT_GNU_RELRO segment, given the addresses
>> >> of PT_GNU_RELRO segment. It is impossible to set address of the first
>> >> section in PT_GNU_RELRO segment from lang_size_sections.
>> >
>> > Look again at the code for exp_dataseg_relro_adjust. If you change
>> > expld.dataseg.base there you will change addresses of sections in the
>> > relro segment.
>>
>> But I don't want to change expld.dataseg.base. I just want to
>> bump the address of the first section a bit.
>
> This says to me that you haven't analyzed the current relro code.
>
> That gives me no confidence that your patch is good for more that just
> the testcase you submitted. It's clear to me that it will interact
> with the existing exp_dataseg_relro_adjust code, perhaps badly in some
> cases. I'm not going to OK a patch that makes the relro code even
> more difficult to maintain.
>
I am open to all suggestion as long as expld.dataseg.base is not
changed.
--
H.J.