[RFC,GAS]Propose to emit the attribute section after relaxation
Terry Guo
flameroc@gmail.com
Fri Sep 19 01:55:00 GMT 2014
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
More information about the Binutils
mailing list