Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Fortran 90 Compiler for HP-UX: Fortran 90 Programmer's Guide > Chapter 1 An overview of HP Fortran 90

Linker

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

The linker (ld) builds an executable program from the object files produced by the back end and the libraries. An important group of options for controlling the linker specify what libraries the linker should search and where it should search for them. Other options control the type of information that the linker should or should not include in its output file, such as symbol table information used by the debugger or marks identifying the output file as shareable or demand-loadable. Table 1-6 “Options for controlling the Linker” lists and briefly describes options that control the linker.

NOTE: If you use the f90 command to compile and link on separate command lines and compile with any of the options (except -c) listed in Table 1-6 “Options for controlling the Linker”, you must specify the same options on the link line as well.

Table 1-6 Options for controlling the Linker

OptionFunction
-c

Suppress linking; produce object files only.

+[no]demand_load

Mark [do not mark] the output file from the linker demand load. If you compile and link separately and specify +demand_load on the compile line, you must also specify it on the link line. The default is +nodemand_load.

For information about using this option, see “Creating demand-loadable executables”.

+FPflags

Specify how the runtime environment for trapping floating-point exceptions should be initialized at program startup. If you compile and link separately and specify +FP on the compile line, you must also specify it on the link line with the identical set of flags. The default is that all traps are disabled. See the ld(1) man page for specific values for flags.

For information using this option, see “Floating-point exceptions”.

+[no]fp_exceptions

Enable [disable] floating-point exceptions. Enabling floating-point exceptions also causes the running program to issue a procedure traceback for runtime errors. The default is +nofp_exceptions.

For information using this option, see “Floating-point exceptions”.

-Ldirectory

Add directory to the front of the library search path. This option applies only to libraries specified by the -l option (see below). If you compile and link separately and specify -L on the compile line, you must also specify it on the link line.

For information about using this option, see “Library search rules”.

-lx

Link the library libx.a or libx.sl to the executable program. If you compile and link separately and specify -l on the compile line, you must also specify it on the link line.

For information about using this option, see “Linking to nondefault libraries” and the ld(1) man page.

-o outfile

Name the output file outfile instead of the default a.out. If linking is suppressed (-c), this option is used instead to name the object files.

+[no]shared

Cause the output file from the linker to be marked shared [unshared]. If you compile and link separately and specify +shared on the compile line, you must also specify it on the link line. The default is +shared.

For information about using this option, see “Creating shared executables”.

+[no]strip

Strip [do not strip] symbol table information from the linker output. For more information, see the ld(1) and strip(1) man pages. This option is not compatible with -g. If you compile and link separately and specify +strip on the compile line, you must also specify it on the link line. The default is +nostrip.

For information using this option, see “Stripping debugging information”.

+[no]ttybuf

Use buffered [unbuffered] output to the terminal. The default is +ttybuf.

+[no]U77

Invoke [do not invoke] support for the libU77 library (BSD 3f). If you compile and link separately and specify +U77 on the compile line, you must also specify it on the link line. The default is +noU77.

For information about the libU77 library, see “Additional HP Fortran 90 libraries” and the HP Fortran 90 Programmer's Reference.

-Wl,options

Pass a comma-separated list of options to the linker. For information about options supported by the linker, see the ld(1) man page.

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.