scc

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

objstrip.c (286B)


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