shithub: scc

ref: 381a14fc9775e9f2cabbac45a4586f55feefc39c
dir: /src/libmach/objstrip.c/

View raw version
#include <stdio.h>

#include <scc/mach.h>

#include "libmach.h"

extern stripfun_t stripv[];

int
objstrip(Obj *obj)
{
	int fmt;
	stripfun_t fn;

	fmt = FORMAT(obj->type);
	if (fmt >= NFORMATS)
		return -1;
	fn = stripv[fmt];
	(*fn)(obj);
	objfree(obj, FREESYM);
	return 0;
}