[Patch] Don't declare all text sections at the start of the .s
rafael.espindola at gmail.com
Wed Mar 18 19:06:55 PDT 2015
Rebased patch attached.
On 17 March 2015 at 18:49, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> And the attached version can also build some obc for arm
> 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.
> 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,
>>> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 19084 bytes
Desc: not available
More information about the llvm-commits