#include <ld.h> lw_start(code);
"lw_start" is the first step in writing out a directive. After this, you use other "lw_" functions to write out the various fields of the directive. You do not have to calculate the length or the checksum of the directive -- these are calculated when you call "lw_end" to close off the directive you have built.
You do not need to create your own LD_DATA and LD_RELOC directives with this routine. Instead, you should build these directives using "lw_dword" and "lw_reloc". The LD utilities will write out appropriate LD_DATA and LD_RELOC directives as they accumulate.
Copyright © 1996, Thinkage Ltd.