IBM Support

LI73059: USING -O2 CAUSES LINKER ERROR

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When -O2 is used, linker error may occur.
    
    ....
    attrbltn.o:(.data+0x700): undefined reference to `.L1078'
    attrbltn.o:(.data+0x708): undefined reference to `.L1079'
    attrbltn.o:(.data+0x710): undefined reference to `.L1079'
    attrbltn.o:(.data+0x718): undefined reference to `.L1078'
    attrbltn.o:(.data+0x720): undefined reference to `.L1078'
    

Local fix

  • Do not use -O2
    

Problem summary

  • Users may be affected when they use code that contains both
    inline assembly and switch statements, with optimizations (-O2
    and up).
    
    When the code has inline assembly, an assembly file is
    generated.  Optimizations can remove/combine some cases from
    switch statements and remove the corresponding labels.
    However, these removed labels were still refered to in the
    branch tables, causing undefined errors at link time.
    
    As a result, Linker errors: "undefined reference to `.Ln'"
    (where n is an integer) may occur.
    

Problem conclusion

  • A fix will be developed in a future PTF.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI73059

  • Reported component name

    XL C/C++ RHEL5

  • Reported component ID

    5724S7310

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2008-01-23

  • Closed date

    2008-01-23

  • Last modified date

    2008-01-23

Fix information

  • Fixed component name

    XL C/C++ RHEL5

  • Fixed component ID

    5724S7310

Applicable component levels

  • R900 PSY

       UP

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
15 October 2021