ref: 279bf67dfc38f55a3c9f4529799686608bd28bb4
dir: /src/libmach/libmach.h/
#define NBYTES 20 #define OBJ(format,arch,order) ((order) << 10 | (arch) << 5 | (format)) #define FORMAT(t) ((t) & 0x1f) #define ARCH(t) (((t) >> 5) & 0x1f) #define ORDER(t) (((t) >> 10) & 0x1f) enum objformat { COFF32, NFORMATS, }; enum objarch { ARCH286, ARCH386, ARCHAMD64, ARCHZ80, ARCHARM32, ARCHARM64, }; enum order { LITTLE_ENDIAN, BIG_ENDIAN, }; /* common functions */ extern int pack(int order, unsigned char *dst, char *fmt, ...); extern int unpack(int order, unsigned char *src, char *fmt, ...); extern int objpos(Obj *obj, FILE *fp, long pos); /* globals */ extern Objops *objops[]; extern Objops coff32;