[PATCH] Fix alignment for the first section frag on xtensa
Max Filippov
jcmvbkbc@gmail.com
Tue Apr 22 10:58:00 GMT 2014
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
More information about the Binutils
mailing list