I cleaned up my code a bit, and integrated into the LLVM sources. While this code works for my purposes, it needs a bit more work before its generally useful.<div><br></div><div>Two aspects I think will cause the most trouble are not having support for uninitialized data sections, and common symbols. Uninitialized data sections should be relatively simple to add, but its not clear to me how common symbols should be implemented.<div>
<br></div><div>For normal symbols, I assume they are contained within the current section. From what I understand, COFF common symbols must be in their own section. It can't tell if it is guaranteed that MCStreamer::SwitchSection will be called after the emission of a common symbol thus giving the exporter an opportunity to switch back to the section for normal symbols. On the other hand, there is a section pointer associated with the symbol, if this is reliable, what is the need for MCStreamer::SwitchSection, is it (or should it be) possible to emit data or code not tied to a symbol?<br>
<div><div class="gmail_quote"><br></div><div class="gmail_quote">- Nathan</div></div></div></div>