LW_OPEN - open an LD output file.

Usage:

#include <ld.h>
lw_open(filename,reloc_align,bits_per_byte,most_reloc,
        longest_reloc,origin_bits,target);

Where:

char *filename;
is a string giving the name of the LD file you want to open. If you specify NULL for this argument, "lw_open" will pretend to open an output file and all "lw_" routines will behave as if there is an output file open. However, the utilities will attempt to keep generated output in memory rather than writing it to an actual file. If there turns out to be too much to store in memory, the utility routines will create a temporary file to hold the output. This file will have a name chosen not to match any other existing files. The file will be deleted automatically when the current program terminates. Thus, the only way to read back what is written to this file is to call "lw_reread".
unsigned reloc_align;
is the relocation alignment of the file being created: the number of bits in a TWORD.
unsigned bits_per_byte;
is the number of bits in a byte on the target machine.
unsigned most_reloc;
is the maximum number of relocation instructions that can be applied to a single TWORD.
unsigned longest_reloc;
is the size of the longest relocatable data object on the target machine. This size is given in TWORDs.
unsigned origin_bits;
is the number of bits required to give the origin of relocation in an LD_DATA directive.
char *target_machine_name;
is a string giving the name of the intended target machine.

Description:

"lw_open" opens a file as the LD output file. It also outputs appropriate LC_LDVERSION and LC_TARGET_INFO directives as the first two directives of the file.

See Also:

expl ld lib lw_close

expl ld lib lw_lopen

expl ld lib lr_open

expl ld lib lw_reread

Copyright © 1996, Thinkage Ltd.