This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Fix alignment for the first section frag on xtensa
- From: Max Filippov <jcmvbkbc at gmail dot com>
- To: Sterling Augustine <augustine dot sterling at gmail dot com>
- Cc: binutils at sourceware dot org, David Weatherford <weath at cadence dot com>, Marc Gauthier <marc at cadence dot com>, "linux-xtensa at linux-xtensa dot org" <linux-xtensa at linux-xtensa dot org>
- Date: Tue, 22 Apr 2014 14:57:57 +0400
- Subject: Re: [PATCH] Fix alignment for the first section frag on xtensa
- Authentication-results: sourceware.org; auth=none
- References: <1398077682-22196-1-git-send-email-jcmvbkbc at gmail dot com> <CAGSvup85+Kqr56KqE6E3rw-jjepL==vezon1c9Q+P2NcdUX3wA at mail dot gmail dot com>
On Tue, Apr 22, 2014 at 3:52 AM, Sterling Augustine
<augustine.sterling@gmail.com> wrote:
> On Mon, Apr 21, 2014 at 3:54 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> Linking object files produced by partial linking with link-time
>> relaxation enabled sometimes fails with the following error message:
>>
>> dangerous relocation: call8: misaligned call target: (.text.unlikely+0x63)
>>
>> This happens because no basic block with an XTENSA_PROP_ALIGN flag in the
>> property table is generated for the first basic block, even if the
>> .align directive is present.
>> It was believed that the first frag alignment could be derived from the
>> section alignment, but this was not implemented for the partial linking
>> case: after partial linking first frag of a section may become not
>> first, but no additional alignment frag is inserted before it.
>> Basic block for such frag may be merged with previous basic block into
>> extended basic block during relaxation pass losing its alignment
>> restrictions.
>
> It seems likely to me that I could construct a case that made for a
> failure even after this patch is applied.
I'd be interested to see such test case.
[...]
> Now would be a good time to get write-after-approval permission, so
> you can check this in yourself.
Ok, I've filed a request specifying you as the approver.
--
Thanks.
-- Max