shithub: scc

ref: 67b4a92153e09d3e2ad6a4cd26e64e7878054785
dir: /lib/coff32/coff32_pack_scn.c/

View raw version

#include <assert.h>

#include "../../inc/coff32/scnhdr.h"
#include "../../inc/coff32/coff32.h"

void
coff32_pack_scn(packfun fun, unsigned char *buff, SCNHDR *scn)
{
	int n;

	n = (*fun)(buff,
                  "'8llllllssl",
	          scn->s_name,
	          scn->s_paddr,
	          scn->s_vaddr,
	          scn->s_size,
	          scn->s_scnptr,
	          scn->s_relptr,
	          scn->s_lnnoptr,
	          scn->s_nrelloc,
	          scn->s_nlnno,
	          scn->s_flags);
	assert(n == SCNHSZ);
}