Installation guide

restrictions on using and creating shared libraries do exist. The following
list describes these restrictions:
The /usr directory must be mounted when you run an application that
is linked with shared libraries.
If your application is designed to run when the /usr directory is not
mounted, do not use shared libraries. When you link your application
with shared libraries, your application executable does not include the
shared library; it includes only information it needs to load the shared
library. If the shared libraries are unavailable when you run your
application, it fails.
You cannot use -O3 or -O4 optimization options when you link your C
application with shared libraries or when you create shared libraries.
If you want to optimize your C application by using one of these
options, you must link with archive libraries. (You might be able to
optimize applications written in other languages that you link with
shared libraries. For more information about linking applications
written in languages other than C with shared libraries, see the
documentation for the language you are using.)
All code must be position-independent code when you create a shared
library.
You must recompile and link your code with a DIGITAL UNIX compiler
in order to have position-independent code. Assembler code must also
be written to be position-independent code, using the rules mentioned
in the DIGITAL UNIX Calling Standard for Alpha Systems manual.
Do not use profiling with shared libraries.
The pixie and pixstats commands are supported only with archive
libraries.
Do not link shared libraries with archive libraries.
Shared libraries should only depend on other shared libraries. Linking
a shared library with an archive library could create conflicting
references at run time, causing unpredictable program behavior.
Applications might need to be modified when linking with shared
libraries if they depend on specifics of the ULTRIX call frame or on
run-time stack tracing of libraries.
See the DIGITAL UNIX Calling Standard for Alpha Systems for
specific information on changes.
The stack version of the alloca() function is currently unusable in
shared libraries.
Overview of the DIGITAL UNIX Programming Environment 6–15