#ifndef _KXLD_UTIL_H_
#define _KXLD_UTIL_H_
-#include <mach/machine.h>
#include <sys/types.h>
#if KERNEL
#include <libkern/kxld_types.h>
+ #include <mach/machine.h>
#else
#include <architecture/byte_order.h>
#include "kxld_types.h"
+
+ /* Get machine.h from the kernel source so we can support all platforms
+ * that the kernel supports. Otherwise we're at the mercy of the host.
+ */
+ #include "../../osfmk/mach/machine.h"
#endif
/* 64-bit helpers */
void kxld_print_memory_report(void)
__attribute__((visibility("hidden")));
+/*******************************************************************************
+* Cross Linking
+*******************************************************************************/
+#if !KERNEL
+boolean_t kxld_set_cross_link_page_size(kxld_size_t target_page_size);
+#endif /* !KERNEL */
+kxld_size_t kxld_get_effective_page_size(void);
+kxld_addr_t kxld_round_page_cross_safe(kxld_addr_t addr);
+
+
#endif /* _KXLD_UTIL_H_ */