Index of Section 1 Manual Pages
| Interix / SUA | mkshared.1 | Interix / SUA |
MKSHARED(1) System General Commands Manual MKSHARED(1)
NAME
mkshared - make a shared library from a library archive
SYNOPSIS
mkshared [-r | -R | -b hexbase] [-S soname] [-o shared-lib] archive-lib
[-L libpath] [-l lib]
DESCRIPTION
The mkshared utility takes objects from the library archive archive-lib
and creates a shared library in the current directory. If the -o option
is not used then the output shared library name will be the basename of
archive-lib suffixed with ".so.0.0". When major and minor shared library
version numbers are provided with the shared-lib name then symbolic links
will be automatically created of the shared-lib name plus major number
and the shared-lib name alone.
The options are:
-b hexbase
When the optional hexbase is specified (in hexadecimal) this will
be used as the image base for the the shared library when loading
at run-time. The hexadecimal letters A through F must be speci-
fied in capitals. If -b is not specified and the utility
print_base(1) is available then the hexbase from print_base(will)
be used. Otherwise a default image base of 0x10000000 will be
used unless the -r option has been specified.
-L libpath
You may optionally specify libraries to link the shared library
against as well as the directories to be searched to find these
libraries. The -L option can be used to specify directories to be
searched.
-l libname
The -l option can be used to specify libraries to be linked
against. These libraries will be listed as "NEEDED" when the
library is loaded.
-n Do not create the symbolic links (symlinks).
-o shared-lib
This will be the name of the shared library. Optionally a version
number may be suffixed with one or more version levels (version
level numbers separated by '.'). Typically a major number and a
minor number are specified. When this option is not specified an
output name is grnerated based on archive-lib with a major number
of 0 and minor number of 0.
-r Randomize the image base address, like with -R, if an existing
image base address is not specifically listed with print_base.
-R Always create a image base address using random generation
between the values 0x50000000 and 0x5FFF0000 with the correct
page size segment.
-S soname
Set the SONAME for the shared library to soname instead of the
default (described below).
Once the shared library is created then symbolic shared library links are
made if appropriate.
The SONAME for the shared library is set by default to the shared-lib
name with the major number if provided but not minor or smaller numbers.
The -L and -l options must come after the archive-lib.
EXAMPLES
mkshared -o libMine.so.3.2 -b 0x55FE0000 libMine.a -L/usr/local/lib
-ljpeg
ENVIRONMENT
No environment variables are used.
SEE ALSO
gcc(1), ld(1), ln(1)
BUGS
No verification beyond the named file existing is done to the library
archive to determine if it is valid.
Interix June 25, 2009 Interix