Unresolved symbols

Inconsistent reference vs. definition types

A common error is to compile one part of the code with RENT and another with NORENT. A RENT type reference (Q-CON in the binder listing) must be resolved by a Writable Static Area definition of a PART or a DESCRIPTOR in class C_WSA. A NORENT reference (V-CON or A-CON in the binder listing) must be resolved by CSECT or a LABEL typically in class C_CODE or B_TEXT.

Check the binder map to ensure that objects appear as parts in the expected classes (C_CODE, B_TEXT, C_WSA ...).

Inconsistent name usage

Another problem is the case sensitivity of the symbol names. Objects in the Writable Static Area cannot be renamed, but unresolved function references may be renamed to find a definition of a different name. See Rename processing. Such inconsistencies arise from inconsistent usage of the LONGNAME and NOLONGNAME compiler options, and from multi-language programs that make symbol names uppercase.

Example: Compile the file main.c with the options LONG, NORENT, and other.c with the options NOLONG, RENT:

 /* file: main.c */
 /* compile with LONG, NORENT */
 extern int I2;
 extern int func2(void);
 main() {
   int i;
   i = i2 + func2();
   return i;
 }
/* file: other.c */
/* compile with NOLONG,RENT */
int I2 = 2;
int func2(void) { return 2; }
When you bind the object modules together, the following errors will occur:
  • An inconsistent use of the RENT | NORENT C compiler option causes symbol I2 to be unresolved. The definition of I2 from other.c is a writable static object because of the RENT option. But a writable static object cannot resolve the reference to I2 from main.c because it is a NORENT reference. The binder messages show:
    IEW2308I 1112 SECTION I2 HAS BEEN MERGED.
    
    IEW2456E 9207 SYMBOL I2 UNRESOLVED.
  • An inconsistent use of the LONG | NOLONG C compiler option causes the symbol func2 to be unresolved. The function definition in other.c is in uppercase because of the NOLONG option. But the reference to func2 from main.c is in lowercase because of the LONG option. The binder listing shows that FUNC2 is a LABEL, that is a defined entry point; yet the binder messages show:
    IEW2456E 9207 SYMBOL func2 UNRESOLVED.