DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

idld(M)


idld -- link editor used by the Link Kit

Syntax

idld [ options ] filename

Description

idld is used by the Link Kit to relink the UNIX kernel.

The idld command combines several COFF format object files into one, performs relocation, resolves external symbols, and supports symbol table information for symbolic debugging. It creates an executable program by combining one or more object files and copying the executable result to the file a.out. The filename must name an object or library file. By convention these names have the ``.o'' (for object) or ``.a'' (for archive library) extensions. If more than one name is given, the names must be separated by one or more spaces. If any input file, filename, is not an object file, idld assumes it is either an archive library or a text file containing link editor directives. By default, the file a.out is executable if no errors occurred during the load. If errors occur while linking, idld displays an error message; the resulting a.out file is unexecutable.

idld concatenates the contents of the given object files in the order given in the command line. Library files in the command line are examined only if there are unresolved external references encountered from previous object files.

The library is searched iteratively to satisfy as many references as possible and only those routines that define unresolved external references are concatenated. The library (archive) symbol table (see ar(CP)) is searched sequentially with as many passes as are necessary to resolve external references which can be satisfied by library members. Thus, the ordering of library members is functionally unimportant, unless multiple library members exist defining the same external symbol. The library may be either a relocatable archive library or a shared library. Object and library files are processed at the point they are encountered in the argument list, so the order of files in the command line is important. In general, all object files should be given before library files. idld sets the entry point of the resulting program to the beginning of the first routine.

idld recognizes the following options:


-a
Create an absolute file. This is the default if the -r option is not used. Used with the -r option, -a allocates memory for common symbols.

-e epsym
Set the default entry point address for the output file to be that of the symbol epsym.

-f fill
Set the default fill pattern for ``holes'' within an output section as well as initialized bss sections. The argument fill is a two-byte constant.

-lx
Search a library libx.a, where x is up to nine characters. A library is searched when its name is encountered, so the placement of a -l is significant. By default, libraries are located in LIBDIR or LLIBDIR.

-L dir
Change the algorithm of searching for libx.a to look in dir before looking in LIBDIR and LLIBDIR. This option is effective only if it precedes the -l option on the command line.

-m
Produce a map or listing of the input/output sections on the standard output.

-M
Output a message for each multiply-defined external definition.

-N
Put the text section at the beginning of the text segment rather than after all the header information, and put the data section immediately following text in the core image.

-o name
Set the executable program filename to name instead of a.out.

-r
Retain relocation entries in the output object file. Relocation entries must be saved if the output file is to become an input file in a subsequent idld run. The link editor will not complain about unresolved references, and the output file will not be executable.

-s
Strip line number entries and symbol table information from the output object file.

-t
Turn off the warning about multiply-defined symbols that are not the same size.

-u symbol
Designate the specified symbol as undefined. This is useful for loading entirely from a library, since initially the symbol table is empty and an unresolved reference is needed to force the loading of the first routine. The placement of this option on the idld line is significant; it must be placed before the library which will define the symbol.

-V
Output a message giving information about the version of idld being used.

-VS num
Use num as a decimal version stamp identifying the a.out file that is produced. The version stamp is stored in the optional header.

-x
Do not preserve local symbols in the output symbol table; enter external and static symbols only. This option saves some space in the output file.

-Y[ LU],dir
Change the default directory used for finding libraries. If L is specified, the first default directory which idld searches, LIBDIR, is replaced by dir. If U is specified and idld has been built with a second default directory, LLIBDIR, then that directory is replaced by dir. If idld was built with only one default directory and U is specified, a warning is printed and the option is ignored.

-z
Do not bind anything to address zero. This option will allow runtime detection of null pointers.

Exit values

idld returns 0 (zero) if it succeeds in linking an executable output file; it returns a non-zero value if an error occurs.

Diagnostics

If the link editor does not recognize an input file as an object file or an archive file, it will assume that it contains link editor directives and will attempt to parse it. This will occasionally produce an error message complaining about ``syntax errors''.

Warning

Invoking idld directly is not recommended since failure to give command line arguments in the correct order can result in errors.

Limitations

idld is intended for use by the Link Kit only; it cannot link XENIX x.out binaries. The link editor ld, however, is capable of linking x.out binaries. ld is supplied as part of the SCO OpenServer Development System, which also includes the startup routines, libraries, and header files necessary for program development.

The source programs for the input object files should conform to the following rules:

Files


/bin/idld
idld executable file

LIBDIR/libx.a
Development System libraries (LIBDIR is usually defined as /lib)

LLIBDIR/libx.a
Development System libraries (LLIBDIR is usually defined as /usr/lib)

a.out
default output file if -o option is not given

See also

a.out(FP), ar(CP), as(CP), cc(CP), end(S), exit(S), ld(CP), mkshlib(CP)

Standards conformance

idld is conformant with AT&T SVID Issue 2.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003