[Patch] Don't declare all text sections at the start of the .s
rafael.espindola at gmail.com
Tue Mar 17 13:26:13 PDT 2015
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: 25567 bytes
Desc: not available
More information about the llvm-commits