LW_LOPEN - open an LD library for updating.
Usage:
#include <ld.h>
lw_lopen(filename,clearflag,index_seek,first_module);
Where:
- char *filename;
- is a string giving the name of the library that you want
to open. If the library doesn't currently exist, it will
be created; in this case, the "clearflag"
argument must be non-zero or the routine will terminate
the program.
- int clearflag;
- is zero (FALSE) if you want to preserve the current
contents of the library. If "clearflag" is
non-zero (TRUE), the library will be initialized and all
existing contents will be lost.
- unsigned long *index_seek;
- points to an area of memory big enough to hold an
unsigned long value. "lw_lopen" will assign
this memory the seek address of the library's index. This
seek address is suitable for use with "lw_seek"
or "lr_seek". If the library is empty,
"lw_lopen" will return a seek address of zero.
- unsigned long *first_module;
- points to an area of memory big enough to hold an
unsigned long value. "lw_lopen" will assign
this memory the seek address of the library's first
module. This seek address is suitable for use with
"lw_seek" or "lr_seek". If the
library is empty, "lw_lopen" will return a seek
address of zero.
Description:
"lw_lopen" opens an LD library for updating and
reads the LC_TARGET_INFO and LC_LIB_HEADER directives that appear
at the beginning of the library.
The file is accessed for both reading and writing, but it will
begin in read mode at seek position zero. To begin writing on the
file, use "lw_lwrite".
If the file is cleared, there will be no LC_TARGET_INFO
directive. Such a directive will be inserted by
"lw_lclose", using values taken from object files
copied by "ld_copy".
See Also:
expl ld lib lw_lwrite
expl ld lib lr_lread
expl ld lib ld_copy
Copyright © 1996, Thinkage Ltd.