IBM Support

LI75880: -QIPA FAILS WITH -WL (-MAP,-U,-WRAP)

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • The compiler option, -qipa does not work as designed when used
    with -Wl. When used individually, both options work as intended.
    
    This problem has been reported with the following sub-options of
    -Wl: -wrap, -u and -Map.
    
    The following test case is for -Wl,-wrap and -qipa.
    
    
    ========== Test case
     main.c:
      #include <stdio.h>
    
      void func (void) {
          printf("\nreal func\n");
          return;
      }
    
      int main (int argc, char **argv) {
         func();
         return 0;
      }
    
     wrap.c:
      #include <stdio.h>
      extern void __real_func(void);
    
      void __wrap_func(void) {
          printf("wrapped function\n");
          __real_func();
          return;
      }
    
     makefile:
      all: link ipa ipa-link
    
      link:
       xlc -c -o wrap1.o wrap.c
       xlc -Wl,-wrap,func -o test-link main.c wrap1.o
    
      ipa:
       xlc -qipa -c -o wrap2.o wrap.c
       xlc -qipa -o test-ipa main.c wrap2.o
    
      ipa-link:
       xlc -qipa -c -o wrap3.o wrap.c
       xlc -qipa -Wl,-wrap,func -o test-ipa-link main.c wrap3.o
    
      clean:
       rm -f test test-ipa test-link test-ipa-link *.o
    
    
    ========== Observed Output
     $ make
     xlc -c -o wrap1.o wrap.c
     xlc -Wl,-wrap,func -o test-link main.c wrap1.o
     xlc -qipa -c -o wrap2.o wrap.c
     xlc -qipa -o test-ipa main.c wrap2.o
     xlc -qipa -c -o wrap3.o wrap.c
     xlc -qipa -Wl,-wrap,func -o test-ipa-link main.c wrap3.o
     1586-083 (W) ld option -wrap ignored by IPA
     1586-109 (U) Input file "func" cannot be processed.  An input
    file must be either an object file, an import file, or an
    archive.
     make: *** [compile-ipa-link] Error 1
    

Local fix

  • Use the -noipa compiler option.
    

Problem summary

  • PROBLEM DESCRIPTION:
    Using -Wl,-wrap,func cause option with -qipa cause compiler to
    fail to link.
    
    USERS AFFECTED:
    Users using -Wl,-wrap,func option and compiling with -qipa on
    Linux.
    

Problem conclusion

  • Tell compiler that -wrap is followed by an extra parameter.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI75880

  • Reported component name

    XL C/C++ RHEL52

  • Reported component ID

    5724U8310

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-01-27

  • Closed date

    2011-01-27

  • Last modified date

    2011-01-27

  • APAR is sysrouted FROM one or more of the following:

    LI75720

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL C/C++ RHEL52

  • Fixed component ID

    5724U8310

Applicable component levels



Document information

More support for: XL C/C++

Software version: A.1

Reference #: LI75880

Modified date: 27 January 2011


Translate this page: