title: Determine program segments (HEADER, TEXT, CONST, etc...) at run time
body: <p>So i realize I can open a binary up in IDA Pro and determine where the segments start/stop.  Is it possible to determine this at run-time in Cocoa?</p>
  
  <p>I'm assuming there are some c-level library functions that enable this, I poked around in the mach headers but couldn't find much :/</p>
  
  <p>Thanks in advance!</p>