elftype.c - scc - simple c99 compiler
HTML git clone git://git.simple-cc.org/scc
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
elftype.c (284B)
---
1 #include <stdio.h>
2 #include <string.h>
3
4 #include <scc/mach.h>
5 #include <scc/elf.h>
6
7 #include "../libmach.h"
8 #include "fun.h"
9
10 int
11 elftype(char *name)
12 {
13 struct arch *ap;
14
15 for (ap = elfarchs; ap ->name; ap++) {
16 if (strcmp(ap->name, name) == 0)
17 return ap->type;
18 }
19
20 return -1;
21 }