morehouse added a comment. You can probably get rid of the llvm-objcopy code and make this a lot simpler with something like:
1. Call `getSection()` on the Binary object to get the text section. 2. Read the `sh_offset` and `sh_size` of that section. 3. Copy `sh_size` bytes from the start of the binary buffer + `sh_offset` into your executable memory. 4. Run it. Repository: rC Clang https://reviews.llvm.org/D49526 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits