[llvm-commits] [patch] Identifying code sections in MCJIT

Jim Grosbach grosbach at apple.com
Fri Dec 14 10:22:40 PST 2012


Just poking my nose in to confirm that looking the pure-instructions flag is a good way to go. Andy, echristo and I chatted about this on IRC a bit the other day.

-Jim

On Dec 13, 2012, at 3:19 PM, "Kaylor, Andrew" <andrew.kaylor at intel.com> wrote:

> The MachO sections that contain code will have an attribute called "PURE_INSTRUCTIONS" or something similar (I haven't looked it up yet) that is equivalent to the ELF SHF_EXECINSTR flag.  It turns out that there can also be read-only data in these "pure instruction" sections (constants, EH tables, etc.), but the attribute will tell us what we want to know.
> 
> There another attribute that's something along the lines of "contains some instructions" but I'm told that isn't used in LLVM.
> 
> -Andy
> 
> -----Original Message-----
> From: Tim Northover [mailto:t.p.northover at gmail.com] 
> Sent: Thursday, December 13, 2012 3:04 PM
> To: Kaylor, Andrew
> Cc: Amara Emerson; llvm-commits
> Subject: Re: [llvm-commits] [patch] Identifying code sections in MCJIT
> 
>> I just asked about this on IRC and I think I now know how to make isSectionText work for MachO.  Go ahead with your patch and I'll see what I can do with the MCJIT tests on MachO afterward.
> 
> Ok. I'll commit it in the morning (assuming no-one else objects). But I'd like to hear at least a managers' view of how you're making MachO behave. With luck I'll remember something next time it comes up. It's all very well knowing ELF, but that's not the only format out there.
> 
> Tim.
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list