IBM Support

LI71616: SAME OBJECT CREATES DIFFERENT MANGLED NAME

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When rebuilding a shared object, its mangled name is not the
    same as it was when it was first built.  This makes it necessary
    to
    re-link an application everytime a shared object is rebuilt.
    

Local fix

  • N/A
    

Problem summary

  • same as submitter's text
    

Problem conclusion

  • SER AFFECTED:
    User of local class with member functions, whom exported the
    symbol name in a shared library.
    
    PROBLEMDESCRIPTION:
    The mangled name of the member function of a local class changes
    between compliation, this make the shared library's interface
    unstable.
    
    WORKAROUND:
    Use import/export list to control what symbols are exported from
    shared library, and make sure member functions of a local class
    is not exported.  They shouldn't be part of the interface to a
    shared library anyway, since they can't be accessed (from a
    language point of view) outside of the function that declares
    it.
    
    EXPECTED ERROR:
    $ dump -tvX64 pre_a.o | grep "Clear"
    [58]    m
    0x000036e4     .text     1  extern
    .Clear__L304145d0c178_10StmtHandleFv
    
    [310]   m
    0x00006d80     .data     1  extern
    Clear__L304145d0c178_10StmtHandleFv
    
    when dumping object with exported local symbols, the symbols
    shows up as "extern" and the symbol is mangled in the form of
    *_L[0-9a-z]_*
    
    PROBLEM CONCLUSION:
    We changed the compiler to makr member functions in local class
    as static in, such that they don't get exported in shared
    library.
    

Temporary fix

  • use an import/export list
    

Comments

APAR Information

  • APAR number

    LI71616

  • Reported component name

    XL C/C++ RHEL3

  • Reported component ID

    5724K7710

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2006-10-25

  • Closed date

    2006-10-25

  • Last modified date

    2006-10-25

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

    IY81246

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

Fix information

  • Fixed component name

    XL C/C++ RHEL3

  • Fixed component ID

    5724K7710

Applicable component levels

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

Document Information

Modified date:
16 October 2021