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