+DA2.0W is specified), the +Zoption is on by default. This is the only PIC option supported for 64-bit executables.

NOTE: To not generate position-independent code for

64-bit executables, specify the -W1, -noshared option:

Symbol binding options

The following -B options are recognized by HP Fortran to specify whether references to global symbols may be resolved to symbols defined in the current translation unit, or whether they must be assumed to be potentially resolved to symbols defined in another load module.

All -B options are applied in a ‘left to right’ order so that options at the end of a string may supercede those that appear earlier in the string.

-Bdefault=symbol[,symbol...]

The named symbols are assigned the default export class.

 

These symbols may be imported or exported outside of the

 

current load module. The compiler will access tentative

 

symbols through the linkage table. Any symbol that is not

 

assigned to another export class through use of another

 

-Boption (or the deprecated +O[no]extern option) will

 

have the default on a per-symbol basis to specify exceptions

 

to global -Bprotected,-Bhidden,or-Bextern options.

-Bdefault:filename

The file indicated by filename contains a list of symbols,

 

separated by spaces or newlines. These symbols are

 

assigned the default export class.

-Bextern[=symbol [,symbol...]]

The named symbols, or all undefined symbols if no list is

 

provided, are 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 listed symbol that is resolved in the same load module.

-Bextern:filename

The file indicated by filename contains a list of symbols,

 

separated by spaces or newlines. These symbols are

 

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.

Bhidden [=symbol [,symbol...]]

The named symbols, or all symbols if no symbols are

 

specified, are assigned the hidden export class. The hidden

 

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 +Oprocelim is also specified.

 

When used with no symbol list,-BhiddenimpliesW1,

 

-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.

Symbol binding options 37

Page 37
Image 37
HP UX Fortran Software Symbol binding options, Bdefault=symbol,symbol, Bextern =symbol ,symbol, Bhidden =symbol ,symbol