HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)
l
ld_pa(1)
PA-RISC Systems Only
ld_pa(1)
FLOW_DATA An instrumented executable (see the -I
option) writes out the profile data to a database
file named
flow.data in the current directory. The name and location of this file can
be specified by setting FLOW_DATA to the desired path name. The profile data is stored
in the database file under a look-up name that is the same as the basename of the execut-
able file specified at run-time. A single
flow.data file can hold profile data
LDOPTS Arguments can be passed to the linker through the
LDOPTS environment variable as well
as on the command line. The linker gets the value of
LDOPTS and places its contents
before any arguments on the command line.
LPATH Specifies default directories to search for library files. See the
-l option.
LD_LIBRARY_PATH
, SHLIB_PATH , and LD_PRELOAD
Specifies, at runtime, directories to search for library files. See the
+s option, dld.sl(5),
and the
+help option for the Online HP-UX Linker and Libraries User’s Guide manual
for more information.
LD_PROFILE Specifies, at runtime, the path of the shared library to be profiled (See HP-UX Linker and
Libraries Online User’s Guide for details.)
LD_GPROF_LIB_NAME
Specifies at runtime, the path of the profiler used to profile shared libraries. The default
value is
/usr/lib/libgprof32.sl
for 32bit applications and
/usr/lib/pa20_64/libgprof.sl
for 64bit applications.
TMPDIR Specifies a directory for temporary files.
The following internationalization variables affect the execution of
ld:
LANG Determines the locale category for native language, local customs and coded character set
in the absence of LC_ALL and other LC_* environment variables. If LANG is not
specified or is set to the empty string, a default of C (see lang(5)) is used instead of
LANG.
LC_ALL Determines the values for all locale categories and has precedence over LANG and other
LC_* environment variables.
LC_MESSAGES
Determines the locale that should be used to affect the format and contents of diagnostic
messages written to standard error.
LC_NUMERIC Determines the locale category for numeric formatting.
LC_CTYPE Determines the locale category for character handling functions.
NLSPATH Determines the location of message catalogs for the processing of LC_MESSAGES .
If any internationalization variable contains an invalid setting,
ld behaves as if all internationalization
variables are set to
C. See environ(5).
RETURN VALUES
ld returns the following values:
0 Successful completion. The link is successful.
n!=0 Failure. An error has occurred.
EXAMPLES
Link part of a C program for later processing by ld. (Note the .o suffix for the output object file; this is an
HP-UX convention for indicating a linkable object file):
ld -r file1.o file2.o -o prog.o
On 32-bit, link a simple FORTRAN program for use with the dde symbolic debugger (see dde(1)). Output
file name is a.out since there is no -o option in the command line.
ld /usr/ccs/lib/crt0.o ftn.o -lcl -lisamstub \
-lc /opt/langtools/lib/end.o
To do this on 64-bit:
ld ftn.o -lcl -lisamstub \
-lc /opt/langtools/lib/pa20_64/end.o
556 Hewlett-Packard Company − 19 − HP-UX 11i Version 3: February 2007