10.0;bind (bind), revision 1.0, 88/01/21 bind -- Combine object modules into an executable file. bind pathname1 ... [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 manual. 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 executable output object file. The following is a summary of the bind options. See the Domain/OS Programming Environment Reference manual for complete descriptions of each option. OPTIONS -align section-name long Aligns the named section on a 32-bit boundary at run time. -align section-name quad Aligns the named section on a 64-bit boundary at run time. -align section-name 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 directory_name 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 pathname. -end Signifies end of a command that is spread over several lines. -entry global_symbol 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] module-name 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.) -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 global_symbol Marks the specified global symbol. -mark -all Same as -allmark. -marks[ection] section_name Makes section_name 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] new_name Changes the name of the output object module from the default (that is, the first input object module loaded) to new_name. -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. -nolocalsearch (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 sharing. -nomarks[ection] section_name Makes section_name private. -nomarks[ection] -all Makes all subsequent sections private. -nomes[sages] Suppresses informational messages. -n[o]multires (default) Omits error reporting when there are multiple possible resolutions in a library. -nound[efined] Suppresses the listing of undefined globals. -q[uit] Exits from the binder without finishing. -readonly[section] section_name Changes the read/write attribute of section_name to read-only. -runtype type Specify the system call semantics (for example, sys5.3 or bsd4.3) that the program requires at runtime. This option creates runtype type state resource information (SRI) record in the output object module. The default is the environment specified by the -systype option. -sec[tions] Displays a section map. -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). -stacksize decimal_number Produces a stacksize (SRI) with the specified value. -sys[temn] Makes system globals visible. -systype type Builds a system static resource informaiton (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 overrides 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 global_symbol Remove a mark from the specified global symbol. -unmark -all Same as -allunmark. -unmarks[ection] name Makes section_name 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 follow 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