A shared object is generated by a special command: genso. The options and parameters are as for cc.
-B plam ...
-B ar
The options –
L
and -l
bracketed between these options are interpreted so that PLAM libraries can be processed. The new option –m
is also interpreted.
-B static
-B dynamic
Specifies, whether ar libraries or dynamic libraries are used to generate shared objects.
Used only at generation time only.
-B symbolic
Indicator of resolution algorithm.
-L directory
Name of the directory.
-L bs2000_user_id
Only valid between –B plam
and –
B
ar. Specifies the BS2000 user ID:
$
stands for TSOS.
.
(period) stands for the user ID under which the application is running.
%name
the user ID is taken from the environment variable name.
-l xxx
Name of the library: libxxx.a or libxxx.so
If -l xxx
is specified between –B plam
and –
B ar
, then xxx
is the name of the BS2000 library.
-m member
Only applies between –B plam
and –
B ar
. Specifies the name of the PLAM library member (L member).
-o output
Names the output.
-S low | high
The contents of the shared object are output on stdout. For low
this is only the current object, for high
this is also all shared objects still dependent on it.
-X lang=c |
lang=c++ |
lang=cobol
Specifies the programming language of the object to be dynamically loaded. Mixed objects are possible.
Default value is lang=c
.
file.o
.o file used for generation.
Other familiar options from UNIX like -h name
, -Kpic
and -b
are not supported.
The genso command generates the so file. If –B symbolic
is not specified, then at generation time the external links are resolved as far as possible. The objects in the .so file are linked into a link-and-load module (one LLM). When the shared object is loaded, the shared object itself gets the highest priority in resolving the references.
Priority rules to find a library:
Directories for libraries are searched with the following priority:
directories contained in the variable LD_LIBRARY_PATH
directories defined by
–L
optionthe default directory /usr/lib