BIND Aegis BIND
NAME
bind - combine object modules into an executable file
SYNOPSIS
bind pathname ... [pathnameN] [option]...
DESCRIPTION
bind combines two or more object modules into one executable object
module. It resolves external references to global symbols and combines
sections that have the same name. For full details on the binder, see
the Domain/OS Programming Environment Reference.
The command line simply consists of the word bind, one or more pathnames,
and zero or more options.
The binder uses the object modules stored in pathname1 through pathnameN
to create an executable object file. Each pathname must be the name of a
valid object file or library file. (A compiler creates an object file,
and the librarian creates a library file.) You may use wildcards in
pathnames. The binder automatically loads all object modules stored in
object files, but conditionally loads the object modules stored in
library files.
Options modify the binder's actions. Of all the binder's options,
-binary is the most important. You must use this option to get an exe-
cutable output object file.
The following is a summary of the bind options. See the Domain/OS Pro-
gramming Environment Reference for complete descriptions of each option.
OPTIONS
-align sectionName long
Aligns the named section on a 32-bit boundary at run
time.
-align sectionName quad
Aligns the named section on a 64-bit boundary at run
time.
-align sectionName page
Aligns the named section on an 8,192-bit boundary at run
time.
-allkeepmark Preserves all marks.
-allmark Marks all global symbols in the input object files that
appear after the option on the bind command line.
-allocbss Gathers all uninitialized global data from C programs
and allocates them all to a section named .bss.
-allres[olved] Signals a shell severity level of error if there are
unresolved global symbols at the end of a bind command.
This option is useful in controlling shell scripts.
-allunmark (default)
Unmarks all global symbols in the input object files
that appear after the option on the bind command line.
-bdir directoryName
Adds a pathname to the list of directories the binder
searches for input object files.
-b[inary] pathname
Creates an output object module and stores it at path-
name.
-cpu id Specifies the target machine type on which the program
will run. The id must be either m68k or a88k. Use this
option if you are linking on one target machine type but
your executable file will run on the other.
-end Signifies end of a command that is spread over several
lines.
-entry globalSymbol
Specifies a nondefault start address.
-exactcase Makes the binder case-sensitive to all variable names
and section names.
-glo[bals] Writes currently defined global symbols to error output.
-h[elp] Prints this list of commands.
-incl[ude] moduleName
Unconditionally loads the named object module from a
library file into the output object file.
-incl[ude] -all Unconditionally loads all object modules from a library
file into the output object file.
-inlib pathname Specifies that the object modules in pathname are to be
"installed" when the output object file is invoked.
(This is an alternative to the -inlib utility.)
-loadhigh Creates a static resource information (SRI) record to
instruct the loader to load the object at the "high" end
of memory (for position independent code).
-localsearch Forces the binder to make another search through a
library file if the previous search loaded an object
module containing an unresolved external reference.
-looks[ection] name
Makes the named section available for sharing with a
public section in an installed library.
-looks[ection] -all
Makes all subsequent sections available for sharing with
their counterpart public sections in an installed
library.
-mak[ers] Lists the version numbers of the compilers, binders,
etc. that were used to create the input object files.
-map Writes a complete binder map to standard output.
-mark globalSymbol
Marks the specified global symbol.
-mark -all Same as -allmark.
-marks[ection] sectionName
Makes sectionName public. Affects only those object
files that are destined to be installed as an installed
library.
-marks[ection] -all
Makes all subsequent sections public. Affects only
those object files destined to be installed as an
installed library.
-merge[bss] Merges all sections corresponding to C global variables
into a single section named "BSS$". and gathers all
uninitialized global data from C programs, allocating
them to a section named .bss.
-mes[sages] (default)
Produces informational messages at the end of a bind
command.
-mod[ule] newName
Changes the name of the output object module from the
default (that is, the first input object module loaded)
to newName.
-msgs (default) Same as -messages.
-multires Reports errors if multiple resolutions of the same
external symbol exist in object module libraries.
-nmsgs Same as -nomessages.
-noexactcase (default)
Makes the binder case-insensitive to all variable and
section names.
-noinlib pathname
Specifies that the object file(s) in pathname are no
longer to be "installed" when the program is invoked.
-n[o]localsearch (default)
Searches each library file once, then proceeds to search
the next input object file.
-nolooks[ection] name
Makes the named section unavailable for sharing.
-nolooks[ection] -all (default)
Makes all subsequent data sections unavailable for shar-
ing.
-nomes[sages] Suppresses informational messages.
-n[o]multires (default)
Omits error reporting when there are multiple possible
resolutions in a library.
-n[o]und[efined] Suppresses the listing of undefined globals.
-q[uit] Exits from the binder without finishing.
-readonly[section] sectionName
Changes the read/write attribute of sectionName to
read-only.
-runtype type Specifies the system call semantics (for example, sys5.3
or bsd4.3) that the program requires at runtime. This
option creates a runtype type SRI record in the output
object module. The default is the environment specified
by the -systype option.
-sec[tions] Displays a section map.
-segsize decimalNumber
Sets the segment size to decimalNumber, which may be
either 32 or 256. The default is 256. Use -segsize 32
if you want your program to run on SR10.1.
-set_ver[sion] number.number
Sets the program version in the map to the specified
number.
-sortl[ocation] Sorts global symbols numerically (by position).
-sortn[ames] (default)
Sorts global symbols alphabetically (by name).
-sparse_vm Allocates virtual memory disk space in the break area
dynamically rather than at process creation. Do not use
this option with programs that call fork().
-stacksize decimalNumber
Produces a stacksize (SRI) record with the specified
value.
-sys[tem] Makes system globals visible.
-systype type Builds a system SRI record in the output object module
which specifies the resolution of systype dependent
links. For type, you must specify the name of an
operating system (sys5.3 or bsd4.3). This option over-
rides all system information stored in the input object
modules. If -runtype is not specified, it also creates
a runtype static resource record of the same type.
-und[efined] Suppresses a listing of unresolved external symbols
present at the end of a bind command line.
-unmark globalSymbol
Removes a mark from the specified global symbol.
-unmark -all Same as -allunmark.
-unmarks[ection] sectionName
Makes sectionName private. Affects only those object
files that are destined to be installed as an installed
library.
-unmarks[ection] -all (default)
Makes all subsequent sections private. Affects only
those object files that are destined to be installed as
an installed library.
-xref Displays a listing of cross references.
- (hyphen) Tells the binder that more input will follow on the next
line.
EXAMPLES
A simple binder command line. The binder builds an output object file in
my_program from two input object files.
$ bind a.bin b.bin -binary my_program
A library file can also serve as an input object file.
$ bind a.bin my_library -b my_program
The -map option causes bind to print substantial binder information.
$ bind one.bin two.bin three.bin -map -b my_program
The command bind specified by itself tells bind that more input will fol-
low on the next line. Specify a blank line to end the prompting.
$ bind
* paul.bin -allmark -b name.bin
* time.bin -unmark date -unmark year
* john.bin -map
*
Put comments inside braces.
$ bind a.bin b.bin {a comment} -b hope