42-archive/nm-otool/includes/ft_nm_otool.h
2017-03-01 17:56:02 +01:00

33 lines
1.4 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_nm_otool.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/20 14:36:10 by jhalford #+# #+# */
/* Updated: 2017/03/01 17:52:35 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_NM_OTOOL_H
# define FT_NM_OTOOL_H
# include "libft.h"
# include <stdio.h>
# include <sys/mman.h>
# include <mach-o/loader.h>
# include <mach-o/nlist.h>
# include <mach-o/fat.h>
# include <mach/machine.h>
# include <fcntl.h>
# include <sys/stat.h>
# include <stdlib.h>
# define IS_MAGIC_64(x) (x == MH_MAGIC_64 || x == MH_CIGAM_64)
# define IS_FAT(x) (x == FAT_MAGIC || x == FAT_CIGAM)
void dump_symtab(struct symtab_command *sym, struct dysymtab_command *dysym, void *file);
void *hexdump(void *addr, unsigned int offset, unsigned int size);
#endif