This is the mail archive of the
mailing list for the binutils project.
Re: [RFC,GAS]Propose to emit the attribute section after relaxation
- From: Alan Modra <amodra at gmail dot com>
- To: Terry Guo <terry dot guo at arm dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 18 Sep 2014 17:45:41 +0930
- 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>
On Wed, Sep 17, 2014 at 08:06:24PM +0800, Terry Guo wrote:
> Hi there,
> For targets like ARM, some architecture related attributes can only be
> finalized after relaxation step due to relaxable instructions. By then the
> attribute section is already emitted, there is no chance to update the
> emitted attribute section.
Yes, I can see that the size of the attribute section might change if
you want to change attributes.
> At least I tried and couldn't find a way to do
> so. In order to take into account the relaxation, I propose to emit
> attribute section after relaxation step.
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?
Australia Development Lab, IBM