[Patch] Don't declare all text sections at the start of the .s

Rafael Espíndola rafael.espindola at gmail.com
Tue Mar 17 15:49:52 PDT 2015


And the attached version can also build some obc for arm
(https://github.com/joeblau/FlappyBlock).

For those familiar with MachO. Is canGoAfterDWARF or has this found a
bug and we need to reorder things a bit?

Eric, what do you think of the ideas for reducing the plubing in the patch:

* Add a createObjTargetStreamer so that targets that only need to add
a target streamer don't need to call createMCObjectStreamer.
* Spit createMCObjectStreamer into COFF/ELF/MachO versions.

Cheers,
Rafael


On 17 March 2015 at 16:26, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> A rebased and update patch is attached. An earlier version was able to
> boostrap with asserts and debug info on OS X.
>
> I will give this one some extra testing.
>
> On 16 March 2015 at 19:17, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
>> On 13 March 2015 at 18:52, Adrian Prantl <aprantl at apple.com> wrote:
>>> The last time I fixed such an issue was in r199681, which ensured the __cstring section comes before the debug info.
>>> To prevent regressing here again, it would be nice to have an assertion that verifies that the first time we are switching to any __TEXT section we have not yet emitted any of the debug info sections.
>>
>> I like the idea of the assert, since it would catch us ever producing
>> a regular section after dwarf instead of only when there is a output
>> difference and someone is looking at debug/no-debug difference.
>>
>> I assume we still want to make it legal in assembly to create a
>> __DWARF section first, we just want to avoid printing that ourselves,
>> correct?
>>
>> The attached patch is a work in progress. It adds the assert to the
>> MachO streamer since that is the only central point I could find. In
>> order to support .s files, the assert is optional and requires a bit
>> of plumbing.
>>
>> I can reduce the plumbing on the target side. Some ideas
>>
>> * Add a createObjTargetStreamer so that targets that only need to add
>> a target streamer don't need to call createMCObjectStreamer.
>> * Spit createMCObjectStreamer into COFF/ELF/MachO versions.
>>
>> Cheers,
>> Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 25679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150317/fa7e2597/attachment.bin>


More information about the llvm-commits mailing list