IBM Support

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

Fixes are available

January 2011 PTF for XL C/C++ for AIX, V11.1
May 2011 PTF for XL C for AIX, V11.1
May 2011 PTF for XL C/C++ for AIX, V11.1
August 2011 PTF for XL C/C++ for AIX, V11.1
November 2011 PTF for XL C/C++ for AIX, V11.1
January 2012 PTF for XL C for AIX, V11.1
January 2012 PTF for XL C/C++ for AIX, V11.1
April 2012 PTF for XL C for AIX, V11.1
April 2012 PTF for XL C/C++ for AIX, V11.1
July 2012 PTF for XL C/C++ for AIX, V11.1
October 2012 PTF for XL C for AIX, V11.1
October 2012 PTF for XL C/C++ for AIX, V11.1
February 2013 PTF for XL C for AIX, V11.1
February 2013 PTF for XL C/C++ for AIX, V11.1
XL C/C++ for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL C for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL C for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 22 (September 2015 PTF) for 11.1
XL C for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C for AIX Fix Pack 24 (September 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 24 (September 2016 PTF) for 11.1
January 2011 PTF for XL C for AIX, V11.1
August 2011 PTF for XL C for AIX, V11.1
November 2011 PTF for XL C for AIX, V11.1
July 2012 PTF for XL C for AIX, V11.1
XL C for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL C for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL C for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL C for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL C for AIX Fix Pack 22 (September 2015 PTF) for 11.1

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

    IZ91499

  • Reported component name

    XL C FOR AIX

  • Reported component ID

    5724X1200

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-01-03

  • Closed date

    2011-01-03

  • Last modified date

    2011-01-05

  • 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 FOR AIX

  • Fixed component ID

    5724X1200

Applicable component levels

[{"Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH2K","label":"XL C for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1"}]

Document Information

Modified date:
06 October 2021