scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

objsyms.c (255B)


      1 #include <stdio.h>
      2 
      3 #include <scc/mach.h>
      4 
      5 #include "libmach.h"
      6 
      7 static int (*funv[])(Obj *) = {
      8 	[COFF32] = coff32getsyms,
      9 };
     10 
     11 int
     12 objsyms(Obj *obj)
     13 {
     14 	int fmt;
     15 
     16 	fmt = FORMAT(obj->type);
     17 	if (fmt >= NFORMATS)
     18 		return -1;
     19 
     20 	return  (*funv[fmt])(obj);
     21 }