HP Fortran Programmer Guide HP-UX 11i v1, HP-UX 11i v2, and HP-UX 11i v3 (B3908-90032,December 2012)
have the default on a per-symbol basis to specify exceptions
to global -Bprotected, -Bhidden, or-Bexternoptions.
The file indicated by filenamecontains a list of symbols,
separated by spaces or newlines. These symbols are
assigned the default export class.
-Bdefault:filename
The named symbols, or all undefined symbols if no list is
provided, are assigned the default export class.
-Bextern [=symbol [,symbol...]]
Additionally, the compiler will inline the import stub for
calls to these symbols. No compile-time binding of these
symbols will be done. All references to these symbols will
be through the linkage table, so an unnecessary
performance penalty will occur if -Bexternis applied to
a listed symbol that is resolved in the same load module.
The file indicated by filename contains a list of symbols,
separated by spaces or newlines. These symbols are
-Bextern:filename
assigned the default export class. Additionally, the compiler
will inline the import stub for calls to these symbols. No
compile-time binding of these symbols will be done. All
references to these symbols will be through the linkage
table, so an unnecessary performance penalty will occur
if -Bexternis applied to a symbol that is resolved in the
same load module.
The named symbols, or all symbols if no symbols are
specified, are assigned the hidden export class. The hidden
Bhidden [=symbol [,symbol...]]
export class is similar to the protected export class. These
symbols will not be preempted by symbols from other load
modules, so the compiler may bypass the linkage table for
both code and data references and bind them to
locally-defined code and data symbols. In addition, hidden
symbols will not be exported outside the current load
module. The linker may eliminate them from a shared
library, but in an executable, they remain accessible to the
debugger unless +Oprocelimis also specified.
When used with no symbol list,-Bhidden impliesW1,
-aarchive_shared, causing the linker to prefer an
archive library over a shared library if one is available.
This can be overridden by following the -Bhiddenoption
with a subsequent -W1,-aoption.
The file indicated by filename contains a list of symbols,
separated by spaces or newlines. These symbols are
assigned the hidden export class.
-Bhidden:filename
Marks only data symbols as having the protected export
class.
-Bprotected_data
This is the same as -Bprotected, but only locally-defined
(non-tentative) symbols are assigned the protected export
class.
-Bprotected_def
All symbols are assigned the protected export class. This
is equivalent to -Bprotectedwith no symbol list.
-Bsymbolic
Using optimization options
The options described in this section allow you to control the different optimizations that the compiler
can apply to your program. These options fall into two categories:
• Options that control classes of optimization (for example, optimizations that affect code size)
• Options that control specific optimizations (for example, inlining)
The following subsections describe the options in both categories. For information about the options
that control levels of optimization, see the description of the +Onoption in the on page 27. The
36 Compiling and linking