[rfc][patch] Refactoring how we handle symbols for the end of sections

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Mar 19 07:54:49 PDT 2015


On 13 March 2015 at 20:07, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
>
>> On 2015-Mar-11, at 13:55, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
>>
>> I recently refactored how we handle creating symbols for the start of
>> sections. We were doing it in an ad-hoc way and producing .text files
>> that were harder to read (r231898 was the main change).
>>
>> With the infrastructure in place, I am now looking at the symbol
>> pointing to the end of sections. They are not as common, but there are
>> some issues
>>
>> * We can end up printing multiple symbols with the same purpose.
>> * We switch back to sections just to print them even when we could
>> have printed them earlier.
>>
>> The second issues is particularly problematic with
>> -fno-unique-section-names, since trying to switch back to a section
>> marked with ", unique" actually creates a new one.
>>
>> The attached WIP patch fixes the issue. I still have to clean up some
>> issues, like it changing the number of every .Ltmp* symbol, but for
>> now I would like some feedback on the direction.
>>
>> Is the assembly output cleanup and unifying the end section symbol
>> sufficient to justify the patch? It should also make it easier to fix
>> the FIXME about subsections :-)
>>
>> Cheers,
>> Rafael
>
> Sounds like a nice cleanup to me, although I don't know this code
> well enough to confirm.

An updated patch is attached. It is on top of the patch in the "Don't
declare all text sections at the start of the .s" thread.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 35414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150319/c82ff4c5/attachment.bin>


More information about the llvm-commits mailing list