This patch emits the StackMap section on ELF systems. This is required to support llvm.experimental.stackmap and llvm.experimental.patchpoint.
Careful review is appreciated. I don't know the areas I'm touching well and may have gotten things wrong. A couple of things for specific review:
- Are the flags to getELFSection correct?
- Should I change the name of label following the section start?
Worth noting is that previous versions of this patch have been proposed but not submitted several times. For example, one was proposed here:
http://comments.gmane.org/gmane.comp.compilers.llvm.cvs/171038
The code in this change set is original.
I am not familiar with the ELF sections, but wouldn't Metadata be a better for for this section. I guess it doesn't work with it, because the JIT won't ask the client to allocate it?
Lang knows more about this part of the JIT.