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
Release Notes for HP-UX 10.30: HP 9000 Computers > Chapter 7 Other Operating System and Subsystem Changes

Programming Languages

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

This section summarizes changes that affect programming languages.

libM Convergence

For 10.20:

At 10.20, there is a single C math library called libm.a, rather than separate SVID (libm) and XPG4 (libM) libraries. The single library is XPG4.2-compliant. Links are provided from each libM to the corresponding libm so if you call the math library, you do not have to change their makefiles. Compiling with -lM and -lm will both continue to work. Because the SVID and POSIX libraries were essentially the same at 10.0 (except for matherr), you should see no effect.

There are still pa1.0 and pa1.1 versions of the C math library. To support high-performing math code at pa2.0, modify the millicode library, as discussed below.

matherr

For 10.30: See the section "fpclassify" in this chapter for more matherr() information for 10.30.

For 10.20:

At 10.0, if a math routine is called with bad arguments, the library code generally invoked a user-written error handler called either matherr or _matherr, depending on the library. This behavior is gradually being obsoleted.

At 10.20, the two math libraries are converging and their common math error behavior supports both of the previous conventions. Both _matherr() and matherr will be invoked if a math routine is being called with bad arguments. If _matherr returns a non-zero value, matherr will not be called. At 10.20, both archive and shared math libraries support this combined matherr behavior.

In a future HP-UX release, the math library functions will no longer call matherr or _matherr when there is an error. Instead, there will be forward compatibility of shared-linked executables by versioning shared libraries. /usr/lib/libm.2 will be added with the new matherr behavior while continuing to supply a /usr/lib/libm.1 with the old 10.0 behavior. At this future release, you will have to modify your applications so they do not depend on matherr. See the Floating-Point Guide for a sample wrapper function.

HUGE_VAL

For 10.20:

HUGE_VAL, which is currently defined in <math.h> as the largest double-precision value, will change to IEEE infinity at at future HP-UX release. This will coincide with a change in libc, which returns HUGE_VAL from certain string-to-float conversion routines.

Library Convergence

For 10.20:

At a future HP-UX release, a separate pa1.0 set of math libraries will not be shipped.

Millicode

For 10.20:

New math entry points have been added to the millicode library (/usr/lib/milli.a). Because the compiler generates millicode, you can choose the name of these new entry points. For example, you can use the name log_20 even though there is an existing log entry. The new routines are PA2.0 code and the compiler will only generate calls to the routines if +DA2.0 appears on the compile line.

Because of the +Olibcalls switch, which enables the generation of millicode calls for math routines, you can compile your programs and link them with 2.0-specific math routines. This allows you to obtain the full benefits of the pa2.0 architecture improvements in your floating-point applications.

Functions Moved From libc to libm

For 10.20:

The functions frexp, ldexp, and modf, which have been supplied in HP-UX as part of the C library, are being shipped in the math library. This change has been made for XPG4.2 compliance. The functions will also remain in the C library for backward compatibility until the next release of libc.

Automatic Vector Support in Math Library

For 10.20:

When programs are optimized with +Ovectorize, they can access some special vector support in /usr/lib/pa1.1/libm.a. Other than setting the optimizer switches, you do not have to make changes to obtain the resulting support routines. Among the routines provided are those that can move a vector, multiply by a constant, or take the sum of the elements. The High-Level Optimizer recognizes suitable loops in the user program and replaces them by math library calls. Programs compiled with +DA1.1 or +DA2.0 can benefit from this. Some of the routines in /usr/lib/pa1.1/libm.a are PA2.0 code, but the compiler ensures that they are only linked with 2.0 programs.

Linker and Dynamic Loader

For 10.20:

Linker

The linker (ld) and the dynamic loader (dld.sl) issue warning messages for any compatibility issues. These issues are described below. The messages, issued by default, can be turned off with the new option +vcompatwarnings and turned off with the option +vnocompatwarnings.

The following will issue a message:

  • Linking any PA 2.0 object files. These object files, when linked, will not execute on a PA 1.x machine.

  • The -C option (procedure call parameter and return type checking)

  • The -A option (incremental loading)

  • Any -H or -F options

  • Linking object files that contain two symbols with the same name, but are of incompatible types. The most common situation would be a variable and a function that have the same name, but are in different object files.

  • Library Created Storage (LCS) under certain circumstances. These messages only appear if the v option is also given. LCS can be detected by the following message:

    Loading <object file name>:<symbol name>

    A warning is issued only when LCS is used on an object file, but no functions within that object were used. This is because the object file is not checked for any unsatisfied symbols in the current toolset.

  • Whenever a shared library is being created which uses Intra-library versioning.

Dynamic Loader

The dynamic loader (dld.sl) also issues warning messages. By default, these message are off. The messages can be turned on by setting the environment variable _HP_DLDOPTS to the include the string warnings. For example,

export _HP_DLDOPTS=-warnings

One of the following can trigger a message:

  • Certain routines and flags in the shl_load(3x) API. They include:

      shl_definesym()         shl_get()
    shl_get_r() shl_gethandle()
    shl_gethandle_r() shl_getsymbols()
    BIND_FIRST BIND_NOSTART
    BIND_NONFATAL BIND_VERBOSE
    DYNAMIC_PATH TYPE_PROCEDURE
    TYPE_DATA TYPE_STORAGE

    These may not be supported in a future 64-bit environment.

  • Linking object files that contain two symbols with the same name, but are of incompatible types. The most common situation would be a variable and a function that have the same name, but are in different object files.

Impact

The changes to the linker will result in more warning messages being issued. This might cause test suites and other programs which rely on the linker's output to fail.

The dynamic loader might cause a program to have a slower start-up time because the loader needs to check the environment before the program can be executed.

Performance

The additional checking the linker must do most likely will have no impact on performance.

Program startup time might be affected because the dynamic loader checks the environment before each program is being executed.

Compatibility

Programs that rely on the output of the linker might fail due to the extra messages.

Alternatives

The LDOPTS environment variable can include the +vnocompatwarnings option instead of placing it on the command line. Similarly, the C and C++ compilers can be called with the -Wl,+vnocompatwarnings option to turn off the messages via the compiler.

Obsolescence

The following features of the linker/dynamic loader might become obsoleted in a future HP-UX release (some only for a 64-bit environment):

  • Procedure call parameter and return type checking (linker -C option)

  • Incremental loading (linker -A option)

  • Linker -H and -F options

  • Two symbols with the same name but incompatible types

  • Library created storage

  • Intra-library versioning

  • Parts of the shl_load(3x) API (in a 64-bit environment)

Fastbind

For 10.20:

The fastbind is a new tool that can improve the start-up time of programs that use shared libraries (incomplete executables) by storing information about needed shared library symbols in the executable file.

The following has been modified:

  • The dynamic loader (/usr/lib/dld.sl) has been modified to emit symbol binding information to let the fastbind tool know the symbols used to bind executable. The dld.sl emits symbol binding information only when it is invoked by the fastbind tool.

  • The fastbind tool (fastbind) will perform analysis on the symbols used to bind an executable and store this information in the executable file.

  • The dynamic loader (/usr/lib/dld.sl) has been modified to process the fastbind information (in the executable) during program start-up and use this information to bind the executable instead of the standard search method for binding the symbols.

  • The linker (ld) has been modified to accept the command line option +fb. When the +fb option is used, the linker will automatically run the fastbind tool on the incomplete executable it has produced.

Large UID Support in the Archiver (AR)

For 10.20:

The archiver (AR) stores the user IDs (UID) and group IDs (GID) of the owner of the SOM file in the ar_uid and ar_gid members of the archive header ar_hdr (defined in the header file /usr/include/ar.h). The ar_uid and ar_gid used to be a decimal number (six ASCII characters), left-justified and blank padded. This resulted in a limit of 99999 on UID and GID. To support user and group IDs larger than 99999, the AR now uses a different encoding for user and group ID values. The new encoding will support all values of the 32-bit signed integer UID and GID.

The following has been modified:

  • The AR's new encoding will encode the 32-bit signed integer UID and GID using printable characters. It will encode six bits in each of the first five characters and two bits in the last character. The new encoding also ensures that the last character is not a blank. Old encoding will be used for numbers up to 99999.

  • The ar has also been modified to detect the old UID and GID encoding based on the last character in ar_uid and ar_gid fields. The archiver will correctly decode the old and new encoding of UID and GID values.

Large Files

For 10.20:

The following has been modified:

  • The linker, dynamic loader, and the SOM tools will issue an error message when an input file is greater than 2GB in size.

  • The size, nm, chatr, strip, and odump commands issue a diagnostic message when the input files are greater than 2GB (a large file):

  • The system calls open, lstat, fstat, and stat will return EOVERFLOW if used on a large file. These commands check for the error return value EOVERFLOW and issue an appropriate diagnostic message.

  • The dynamic load /usr/lib/dld.sl issues a diagnostic message if it encounters a shared library larger than 2GB.

  • The linker (ld) and the archiver (ar) issue a diagnostic message when an attempt is made to create an output file larger than 2GB or if any of the input files are greater than 2GB.

Linker On-line Help

For 10.20:

The linker (ld) supports a command line option +help to invoke the HP-UX Linker and Libraries Online User Guide if you are running an X window system and the environment variable DISPLAY is set to the name of your workstation or X terminal.

Impact

For UID and GID values greater than 99999, the ar_uid and ar_gid fields of ar_hdr contain the ASCII encoding of UID and GID and not the ASCII decimal number itself as it did previously.

Performance

The start-up time of programs that have fastbind information might be less because the dynamic loader will use the fastbind information to bind the executable instead of the standard search method for binding the symbols.

Compatibility

Programs that rely on the output of the linker might fail because of the extra diagnostic messages.

HP C/ANSI C

For 10.30:

Features

  • A new keyword __thread is added to support Thread Local Storage (TLS). This new pseudo data type defines thread-specific data from other data items that are shared by all threads. (cma threads (DCE user space threads) does not support TLS.)

  • Default compilation mode is changed from K&R to ANSI Extend (-Ae).

  • lex and yacc libraries are thread safe.

For further information, see the HP C/HP-UX Release Notes, which is shipped with the HP C product in printed form and is available online in the directory /opt/ansic/newconfig/RelNotes.

Impact

  • The roll of the default compilation mode from K&R (-Ac) to ANSI extended (-Ae) may cause customers who have previously not specified the mode (that is, used the default) and whose code used K&R features not supported in ANSI extended to experience possible compile-time errors and changes in run-time semantics. In such cases, their options are either to set the compiler's mode back to K&R (-Ac) or to migrate their source to ANSI.

  • New features and performance improvements are opportunistic for the end user. The user is not required to do anything different; therefore, there is no impact.

For 10.20:

Features:

  • Numerous performance improvements, options, and support for the PA8000 architecture (see Performance section below).

  • Change in the default architecture for code generation and instruction scheduling (see Summary section below).

  • A new option -help is supported, which opens a VUE help window for C on-line reference manual.

  • Large file awareness supports input files larger than 2 GB bytes.

The defaults architecture for code generation and scheduling is as follows:

  • PA2.0 machines generate code that runs on PA2.0 only.

  • PA1.1 machines generate code that runs on PA1.1 and PA2.0. This code is optimized for PA1.1.

  • PA1.0 machines generate code that runs on PA1.0, PA1.1 and PA2.0. This code is optimized for PA1.1.

In prior releases, the S800 compiler always generated PA1.0 code and the S700 compiler always generated PA1.1.

Performance

There is additional performance tuning for the new PA8000 architecture, which is also known as the PA 2.0 architecture. The compiler supports +DA2.0 and +DS2.0 switches to generate peak performance for this architecture. Recompilation for PA2.0 will show significant performance improvements. See the file /usr/lib/sched.models to see the mapping between models and PA architecture versions.

There are enhancement to optimization levels 2, 3, and 4 to enhance performance of programs, including macro definitions of ABS, MIN, and MAX.

The compiler continues to support the existing optimization switches. These switches are:

  • +Oname — detailed switches for individual controls

  • +O[no]data_prefetch — to generate data prefetch instructions for data structures referenced within innermost loops.

  • +Oentrysched — to perform instruction scheduling on a subprogram's entry and exit sequences.

  • +O[no]fail_safe — Fail safe optimization causes the compiler to automatically pick a lower optimization level instead of aborting the optimizer.

  • +O[no]loop_unroll[=unroll_factor] — to control unrolling of loops.

  • +Oglobal_ptrs_unique — to tell the optimizer whether there are unique global pointer variable names, and what the names are.

  • +Oinline_budget — to perform more aggressive inlining.

  • +Optrs_ansi — to assume that an int *p points to an int field of a struct/union, and that char * points to any type of object.

  • +Optrs_to_globals — to tell the optimizer whether global variables are modified through pointers.

Obsolescence

In a future HP-UX release, the bundled C compiler (not the HP C/ANSI C compiler) will either be renamed or some current warnings will be changed to errors.

HP C/HP-UX

For 10.10:

  • The shared libraries libl.1, libl.sl, liby.1, and liby.sl, which were distributed in System Release 10.01 in the directory opt/langtools/lib, have been moved to the system directory usr/lib.

  • The cc driver and the C compiler tools have been changed to be in conformance with the XPG4 standard.

    In the principal change, the argument now delimits the end of options. Any following arguments are treated as operands (typically, input file names), even if they begin with the - character.

For further information about enhancements made to HP C/HP-UX in System Releases 10.00, 10.01, and 10.10, read HP C/HP-UX Release Notes Version A.10.3055 (part number 5964-1375). This is also available online in the file /opt/ansic/newconfig/RelNotes/ansic.10.30.

For details of the changes made to the HP C/HP-UX compiler in System Releases 10.00 and 10.01, read HP C/HP-UX Technical Addendum (part number 5963-4468).

For revised information on alignment modes and their use, read HP C/HP-UX Release Notes Version A.10.01 (online only) located in the file /opt/ansic/newconfig/RelNotes/ansic.10.01.

For 10.0:

The HP C compiler product version A.10.00 release includes enhancements to the compiler, optimizer, and online and hardcopy documentation. The following enhancements have been added to the HP C Series 700/800 compiler product since the A.09.61 release:

  • New location for files.

    Makes it easier to administer HP C/HP-UX.

  • New compiler option +k.

    Supports a change in how shared library global data is accessed by the program file.

  • New compiler option -V.

    Causes each invoked subprocess to print its version information to stderr.

  • Four-byte EUC support in filenames, strings and literals.

    Supports character sets that require four bytes to store each character.

  • New millicode versions of math library functions.

    Improves performance. See “Math Library Routines (libm, libM) ” for more information.

  • Debugging of optimized code.

    Allows you to debug code that is optimized at level 1 or 2. The C compiler now provides support for debugging optimized code in conjunction with the HP Distributed Debugging Environment (DDE). This support is not provided in conjunction with xdb.

  • New option +ESnoparmreloc.

    Disables parameter relocation for function calls.

  • New optimization options +O[no]procelim and +O[no]vectorize.

    Provides finer optimization control.

  • New lint functionality.

    Provides recognition for the HP C -Wp option, and provides an option that is equivalent to a /*LINTLIBRARY*/ comment in source files.

  • New diagnostic message information.

    Simplifies error recovery.

  • Revised information describing alignment modes and their use.

    Supplements the information in the HP C manuals.

For more information see:

  • HP C/HP-UX Version A.10.00 Release Notes (part number 5962-7312)

  • HP C/HP-UX Technical Addendum (part number 5962-7311)

HP C++

For 10.10:

The new features available with HP C++/HP-UX Version A.03.72 are:

  • New compiler option +Xehdtcount — to generate instrumentation that can locate run-time exception handling problems which cause run-time range errors.

  • New syntax for the CXXOPTS Environment Variable — to allow options to be placed before and after the command line parameters to CC.

  • Default parameter initialization — for class objects.

For more information, see your HP C++/HP-UX Version A.10.09 Release Notes and HP C++ Troubleshooting Notes. The release notes are available in the C++ product in hardcopy or in online form in /opt/CC/newconfig/RelNotes/CXX.10.01. The troubleshooting notes are available in the C++ product in /opt/newconfig/RelNotes/tools.ps or in /opt/newconfig/RelNotes/ascii.

For 10.0:

Changes for the HP C++ version, A.03.60, included:

  • Online help and documentation changes.

  • New locations for files and libraries.

  • New compiler option for accessing shared library global data.

  • New compiler option for using millicode routines. (See “Math Library Routines (libm, libM) ”).

  • New compiler option to eliminate dead procedure code.

  • New compiler option for nested shared libraries that contain templates.

  • Support for multi-threaded applications (see “libc Changes to Support Threads”).

  • Four-byte Extended Unix Code (EUC) support.

  • Debugging of optimized code.

  • ANSI C compiler usage.

  • Support for exception handling and shared libraries.

The HP C++ run-time libraries libC.ansi and libC are now shipped as part of the HP-UX core system. Prior to the HP-UX 10.01 release, these libraries were shipped with the HP C++ product.

The following files have been added to the core system at 10.01:

OS-Core:CORE-SHLIBS: /usr/lib/libC.ansi.1
OS-Core:CORE-SHLIBS: /usr/lib/libC.ansi.sl
OS-Core:CORE-SHLIBS: /usr/lib/libC.1
OS-Core:CORE-SHLIBS: /usr/lib/libC.sl

ProgSupport:LANG-MIN: /usr/lib/libC.ansi.a
ProgSupport:LANG-MIN: /usr/lib/libC.a

For more information, see the HP C++/HP-UX Version A.10.00 Release Notes for HP 9000 Series 700/800 Computers. These are on your 10.x system in the ASCII file /opt/CC/newconfig/RelNotes/CXX.10.0.

HP Micro Focus COBOL/UX

HP Micro Focus COBOL/UX must be version B.09.10 or later to run on HP-UX 10.x.

For more information on HP Micro Focus COBOL/UX B.09.10 see:

  • HP Micro Focus COBOL/UX Version B.09.10 Release Notes (part number 5963-4420).

  • HP Micro Focus COBOL/UX Programmer's Guide, E0195 (part number B2433-90020).

HP FORTRAN/9000

The 10.0 release of the HP FORTRAN/9000 compiler includes the following new features:

  • Debugging optimized code.

  • New optimization options.

  • New +k compiler option.

  • New format descriptors.

For more information about this product, refer to the HP FORTRAN/9000 10.0 Release Notes.

HP Pascal/HP-UX Release 10.0

New features include:

  • New optimizer options +O[no]libcalls and +O[no]procelim.

  • Millicode versions of some built-in functions.

  • Information on memory consumption when compiling at optimization level 4.

  • Debugging optimized code (DOC).

  • Thread-safe HP Pascal/HP-UX routines.

  • Referencing shared-library data (+k).

  • Four-byte extended UNIX code (EUC).

  • Compliance with HP-UX 10.0 file system layout.

  • Distributed Debugging Environment (DDE).

  • New warning messages.

  • Information on porting HP Pascal/HP-UX programs.

For more information see:

  • HP Pascal/HP-UX Release Notes (part number B2415-90002).

  • HP Pascal/HP-UX Reference Manual (part number 92431-90006); not revised for 10.0.

  • HP Pascal/HP-UX Programmer's Guide (part number 92431-90005); not revised for 10.0.

  • 10.0 pc(1) manpage for the Pascal compiler.

PA-RISC Assembler Release 10.0

New features of the Precision Architecture RISC (PA-RISC) Assembler for Release 10.0 include:

  • Additional characters in symbol names.

  • Register type-checking in operands.

  • Five new field selectors to handle three-instruction fixup sequences.

  • New .ALLOW and .LEVEL directives, replacing the +DA and +DS compiler options.

  • Additional keywords for .CALLINFO to support stack unwind descriptors.

  • Additional symbol types supported for the .IMPORT directive.

  • New SHLIB_VERSION directive.

  • Complete support for PA-RISC 1.1 features.

  • Compliance with the HP-UX 10.0 file system layout.

  • New and revised warning and error messages.

For more information see:

  • Assembly Language Reference Manual (part number 92432-90001).

  • Assembly Language Release Notes (part number 92432-90007).

  • PA-RISC 1.1 Architecture and Instruction Set Reference Manual (09740-90039).

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