]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/mach-o/mach_header.h
xnu-792.tar.gz
[apple/xnu.git] / iokit / mach-o / mach_header.h
index 4d14d138058cb0631d4f7a9c1faf51576472e647..9dc84d842212c1810846662f7febe94de4f1dac6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
 /*
  *     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 *);
+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);