4.3BSD-Reno/share/man/cat1/ld.0

Compare this file to the similar file:
Show the results in this format:

LD(1)			    UNIX Reference Manual			 LD(1)

NNAAMMEE
     lldd - link editor

SSYYNNOOPPSSIISS
     lldd [option] ...  _f_i_l_e ...

DDEESSCCRRIIPPTTIIOONN
     LLdd combines several object programs into one, resolves external refer-
     ences, and searches libraries.  In the simplest case several object _f_i_l_e_s
     are given, and lldd combines them, producing an object module which can be
     either executed or become the input for a further lldd run.	(In the latter
     case, the --rr option must be given to preserve the relocation bits.) The
     output of lldd is left on _a._o_u_t.  This file is made executable only if no
     errors occurred during the load.

     The argument routines are concatenated in the order specified.  The entry
     point of the output is the beginning of the first routine (unless the --ee
     option is specified).

     If any argument is a library, it is searched exactly once at the point it
     is encountered in the argument list.  Only those routines defining an un-
     resolved external reference are loaded.  If a routine from a library
     references another routine in the library, and the library has not been
     processed by ranlib(1), the referenced routine must appear after the re-
     ferencing routine in the library.	Thus the order of programs within li-
     braries may be important.	The first member of a library should be a file
     named `__.SYMDEF', which is understood to be a dictionary for the library
     as produced by ranlib(1); the dictionary is searched iteratively to
     satisfy as many references as possible.

     The symbols `_etext', `_edata' and `_end' (`etext', `edata' and `end' in
     C) are reserved, and if referred to, are set to the first location above
     the program, the first location above initialized data, and the first lo-
     cation above all data respectively.  It is erroneous to define these sym-
     bols.

     LLdd understands several options.  Except for --ll, they should appear before
     the file names.

     --AA    This option specifies incremental loading, i.e.  linking is to be
	   done in a manner so that the resulting object may be read into an
	   already executing program.  The next argument is the name of a file
	   whose symbol table will be taken as a basis on which to define ad-
	   ditional symbols.  Only newly linked material will be entered into
	   the text and data portions of a.out, but the new symbol table will
	   reflect every symbol defined before and after the incremental load.
	   This argument must appear before any other object file in the argu-
	   ment list.  The --TT option may be used as well, and will be taken to
	   mean that the newly linked segment will commence at the correspond-
	   ing address (which must be a multiple of 1024).  The default value
	   is the old value of _end.

     --DD    Take the next argument as a hexadecimal number and pad the data
	   segment with zero bytes to the indicated length.

     --dd    Force definition of common storage even if the --rr flag is present.

     --ee    The following argument is taken to be the name of the entry point
	   of the loaded program; location 0 is the default.

     --LL_d_i_r
	   Add _d_i_r to the list of directories in which libraries are searched
	   for.  Directories specified with --LL are searched before the stan-
	   dard directories.
     --ll_x   This option is an abbreviation for the library name `_l_i_b_x._a,' where
	   _x is a string.  LLdd searches for libraries first in any directories
	   specified with --LL options, then in the standard directories /_l_i_b,
	   /_u_s_r/_l_i_b, and /_u_s_r/_l_o_c_a_l/_l_i_b.  A library is searched when its name
	   is encountered, so the placement of a --ll is significant.

     --MM    produce a primitive load map, listing the names of the files which
	   will be loaded.

     --NN    Do not make the text portion read only or sharable.	(Use "magic
	   number" 0407.)

     --nn    Arrange (by giving the output file a 0410 "magic number") that when
	   the output file is executed, the text portion will be read-only and
	   shared among all users executing the file.  This involves moving
	   the data areas up to the first possible 1024 byte boundary follow-
	   ing the end of the text.

     --oo    The _n_a_m_e argument after --oo is used as the name of the lldd output
	   file, instead of _a._o_u_t.

     --rr    Generate relocation bits in the output file so that it can be the
	   subject of another lldd run.  This flag also prevents final defini-
	   tions from being given to common symbols, and suppresses the `unde-
	   fined symbol' diagnostics.

     --SS    `Strip' the output by removing all symbols except locals and glo-
	   bals.

     --ss    `Strip' the output, that is, remove the symbol table and relocation
	   bits to save space (but impair the usefulness of the debuggers).
	   This information can also be removed by strip(1).

     --TT    The next argument is a hexadecimal number which sets the text seg-
	   ment origin.  The default origin is 0.

     --tt    ("trace")  Print the name of each file as it is processed.

     --uu    Take the following argument as a symbol and enter it as undefined
	   in the symbol table.  This is useful for loading wholly from a li-
	   brary, since initially the symbol table is empty and an unresolved
	   reference is needed to force the loading of the first routine.

     --XX    Save local symbols except for those whose names begin with `L'.
	   This option is used by cc(1) to discard internally-generated labels
	   while retaining symbols local to routines.

     --xx    Do not preserve local (non-.globl) symbols in the output symbol
	   table; only enter external symbols.	This option saves some space
	   in the output file.

     --yy_s_y_m
	   Indicate each file in which _s_y_m appears, its type and whether the
	   file defines or references it.  Many such options may be given to
	   trace many symbols.	(It is usually necessary to begin _s_y_m with an
	   `_', as external C, FORTRAN and Pascal variables begin with under-
	   scores.)

     --zz    Arrange for the process to be loaded on demand from the resulting
	   executable file (413 format) rather than preloaded.	This is the
	   default.  Results in a 1024 byte header on the output file followed
	   by a text and data segment each of which have size a multiple of
	   1024 bytes (being padded out with nulls in the file if necessary).
	   With this format the first few BSS segment symbols may actually ap-
	   pear (from the output of size(1)) to live in the data segment; this
	   to avoid wasting the space resulting from data segment size round-
	   up.

FFIILLEESS
     /_u_s_r/_l_i_b/_l_i_b*._a	     libraries
     /_u_s_r/_l_o_c_a_l/_l_i_b/_l_i_b*._a   more libraries
     _a._o_u_t		     output file


SSEEEE AALLSSOO
     as(1), ar(1), cc(1), ranlib(1)

HHIISSTTOORRYY
     LLdd appeared in Version 6 AT&T Unix.

BBUUGGSS
     There is no way to force data to be page aligned.	LLdd pads images which
     are to be demand loaded from the file system to the next page boundary to
     avoid a bug in the system.