Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
User Commands (k - l) ld(1)
-dll | -shared Tells ld to mark the loadfile specified by filename7 as a PIC DLL. When you
specify the -dll or -shared flag, the exported symbols are those exported by the
-export_all or -export flags, or those marked by the compiler to be exported.
Any symbols specified by the -export_not flag are not exported.
You cannot use this flag when you use the -call_shared flag. The default action
is the action for the -call_shared flag.
You can specify this flag as often as you want in the command line or an obey
file. Each specification is processed when encountered.
{-dllname | -soname } DLL_name
Tells ld the DLL name to store in the DLL being created. When this DLL is
specified in the link step of another loadfile, the DLL name stored in this DLL is
placed in the libList of the loadfile for later use by rld when searching for DLLs.
If the DLL being created will reside in the Guardian file system, DLL_name must
conform to Guardian filename rules. If the DLL being created will reside in the
OSS file system, DLL_name must conform to OSS pathname rules. To reside in
either file system, DLL_name must be an unqualified Guardian file identifier.
If you specify both a DLL_name and the -o flag, the output loadfile filename is
determined by the -o specification and DLL_name is saved in the DLL being
created.
If you specify DLL_name but do not use the -o flag, the output loadfile filename
uses the DLL_name value.
If you do not specify DLL_name but use the -o flag, the output loadfile filename
is used as the DLL name stored in the DLL being created. Only the unqualified
part (rightmost part) of the output filename is used.
If you omit both a DLL_name and the -o flag, the output loadfile filename and
DLL_name in the libList both default to a.out. HP recommends against using
this default value.
-e symbol_name1
Specifies a function identifier. The specified function is the entry point, that is,
the point at which to begin executing the program when the program is loaded.
You should use this flag only when linking a program that will execute without
standard run-time support facilities and without linking a module such as
CCPPMAIN (in the Guardian file system) or ccppmain.o (in the OSS file sys-
tem) that contains a function with the MAIN attribute. Do not use this flag for
libraries.
-export symbol_name2
Tells ld to mark symbol_name2 for export in the output loadfile in addition to
those normally marked. This flag can be used with the -export_not flag to create
sets of symbols to be exported.
symbol_name2 cannot be the same symbol as symbol_name3.
The default action is to export only those symbols marked by a compiler as
requiring export.
-export_all Tells ld to mark for export in the output loadfile all symbols in the external sym-
bol table that are not one of the following:
• multiext
527188-004 Hewlett-Packard Company 5−37