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

Kaylor, Andrew andrew.kaylor at intel.com
Thu Dec 13 15:19:06 PST 2012


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.




More information about the llvm-commits mailing list