[patch] Fix pr24486

Maxim Ostapenko via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 11:00:09 PDT 2015


On 29/09/15 00:59, Rafael EspĂ­ndola wrote:
> On 24 September 2015 at 07:11, Maxim Ostapenko
> <m.ostapenko at partner.samsung.com> wrote:
>> Hi, Rafael!
>>
>> Here is another patch to fix pr24486. Could you please take a look when you
>> have a time?
> The fragment implies the section, so having both seems an invitation
> to getting them out of sync.
>
> I played with your patch a bit. It is definitely going on the right
> direction, but we should really try to fully replace section with
> (possibly dummy) segment.
>
> The attached patch is all that I could do right now. It does fully
> drop the section, but there are failures to debug.
>
> Cheers,
> Rafael

Thank you for your patch.

I've performed some investigation for failures occurred and found two 
issues:

- We should assign a dummy fragment in current section in EmitLabel 
function.
- In MCObjectStreamer::getCurrentFragment(), we should skip dummy 
fragments (or perhaps just not push them into appropriate section's 
fragments list at all). If we don't do this, 
MCExpr::evaluateAsAbsolute() will fail to evaluate .La - .Lb expressions.

This patch tries to fix these issues, could you please take a look? 
Passed make check-all on my x86_64-unknown-linux-gnu box as well as 
simple bootstrap.

Thanks,
-Maxim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t6.diff
Type: text/x-patch
Size: 39193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151001/7550821b/attachment-0001.bin>


More information about the llvm-commits mailing list