1#include <stdio.h>23#include <scc/mach.h>4#include <scc/coff32.h>56#include "../libmach.h"7#include "fun.h"89int10coff32probe(unsigned char *buf, char **name)11{12 struct arch *ap;1314 for (ap = coff32archs; ap->name; ap++) {15 if (ap->magic[0] == buf[0] && ap->magic[1] == buf[1]) {16 if (name)17 *name = ap->name;18 return ap->type;19 }20 }21 return -1;22}