Skip to main content

Problem:

Porting application from HPUX 11/23 PA-RISC to HPUX 11/23 Itanium.

Compile cobol module with cob, using ld to link

linker produces the warning:

ld: (Warning) Unsatisfied symbol "_mFldhandle" in file xxx.o

This cobol module is one several modules compiled to .obj for inclusion in a shared liabrary. The shared library is built, but at runtime the above

Unsatisfied symbol "_mFldhandle" is not being resolved.

SHLIB_PATHs, and LD_LIBRARY_PATH  are set

which /cobol/lib shared lib to use with the -l flag on the ld command to resolve this symbol

Resolution:

When linking Cobol you must use cob. . IBM, HP and other take the same approach with C . You must use the C tool to link C applications.

_mFldhandle is not defined in any library in $COBDIR/lib. This symbol is created by cob, locally to each shared object, as part of the link process. It is used as part of cancel processing, and shared object load/unload processing.

_mFldhandle is undefined in a shared object under PA-RISC also. The difference  is due to differences in the dynamic loader between HP-UX/PA-RISC and HP-UX/IPF. This is an OS issue. Problem may not show up on PA-RISC because of lazy binding. This defers looking for _mFldhandle from load time to run time. Provided _mFldhandle is never referenced there will be no problem,but if it is referenced  a 114 at run time may occur..

Changing from PA-RISC to IPF - completely different instruction set architectures, and different linker and dynamic loader behaviour. PA-RISC uses HP's proprietary dynamic linking. IPF uses standard SVR4 dynamic linking.

Using the cob command will be the least destabilizing change . It will have no effect on performance. It will make each compile an link common.

If ld is used, ithe ld options for each platform will have to be changed.

Old KB# 2218