This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC,GAS]Propose to emit the attribute section after relaxation
- From: Terry Guo <flameroc at gmail dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 19 Sep 2014 09:55:20 +0800
- Subject: Re: [RFC,GAS]Propose to emit the attribute section after relaxation
- Authentication-results: sourceware.org; auth=none
- References: <000001cfd26f$ce034f80$6a09ee80$ at arm dot com> <20140918081541 dot GA3770 at bubble dot grove dot modra dot org> <CAGbRaL5j1pnar_jaMig0OhydBbAhzqcdLkLyqJnACyTBPg-fNQ at mail dot gmail dot com> <20140918144959 dot GB3770 at bubble dot grove dot modra dot org>
On Thu, Sep 18, 2014 at 10:49 PM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, Sep 18, 2014 at 04:42:45PM +0800, Terry Guo wrote:
>> On Thu, Sep 18, 2014 at 4:15 PM, Alan Modra <amodra@gmail.com> wrote:
>> > That sounds reasonable. What you've done in the patch though is put
>> > the create_obj_attrs_section call later than relax_seg, after
>> > size_seg. Is there a reason you can't call create_obj_attrs_section
>> > immediately after the relax_seg loop?
>>
>> There are two reasons for this. [snip]
>
> The only real reason to put create_obj_attrs_section immediately after
> the relax_seg loop is if at some stage someone wants to put symbols in
> the obj_attrs section and then refer to them in expressions from
> another section. For example, someone might want obj_attr_start and
> obj_attr_end symbols, and use them to put the size of the obj_attr
> section into a data word. Doing that sort of thing would mean
> integrating create_obj_attrs_section into the relax_seg loop, a task
> made a little easier if create_obj_attrs_section was just after the
> loop. I think that is unlikely, so the patch is OK as is.
>
> --
> Alan Modra
> Australia Development Lab, IBM
Many thanks for comments. I will wait for one week to see if there is
more comments. If no more comments and objections, I will go ahead to
commit it.
BR,
Terry