]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/mach-o/mach_header.h
xnu-792.tar.gz
[apple/xnu.git] / osfmk / mach-o / mach_header.h
index 8cf4848690ea292b446f98c80dce619bb79a35f6..25f83b459939b18661088226d5d3bfb36aa27885 100644 (file)
 /*
  *     File: kern/mach_header.h
  *
- *     Definitions for accessing mach-o headers.
+ *    Definitions for accessing mach-o headers.  This header wraps the
+ *    routines defined in osfmk/mach-o/mach_header.c; this is made clear
+ *    by the existance of the getsectcmdsymtabfromheader() prototype.
+ *
+ * NOTE:      The functions prototyped by this header only operate againt
+ *            32 bit mach headers.  Many of these functions imply the
+ *            currently running kernel, and cannot be used against mach
+ *            headers other than that of the currently running kernel.
  *
  * HISTORY
  * 29-Jan-92  Mike DeMoney (mike@next.com)
@@ -46,17 +53,17 @@ struct segment_command *nextseg(struct segment_command *sgp);
 struct segment_command *nextsegfromheader(
        struct mach_header      *header,
        struct segment_command  *seg);
-struct segment_command *getsegbyname(char *seg_name);
+struct segment_command *getsegbyname(const char *seg_name);
 struct segment_command *getsegbynamefromheader(
        struct mach_header      *header,
-       char                    *seg_name);
-void *getsegdatafromheader(struct mach_header *, char *, int *);
-struct section *getsectbyname(char *seg_name, char *sect_name);
+       const char              *seg_name);
+void *getsegdatafromheader(struct mach_header *, const char *, int *);
+struct section *getsectbyname(const char *seg_name, const char *sect_name);
 struct section *getsectbynamefromheader(
        struct mach_header      *header,
-       char                    *seg_name,
-       char                    *sect_name);
-void *getsectdatafromheader(struct mach_header *, char *, char *, int *);
+       const char              *seg_name,
+       const char              *sect_name);
+void *getsectdatafromheader(struct mach_header *, const char *, const char *, int *);
 struct section *firstsect(struct segment_command *sgp);
 struct section *nextsect(struct segment_command *sgp, struct section *sp);
 struct fvmlib_command *fvmlib(void);