IBM Support

IV18499: NON VIRTUAL THUNK ERROR AT LINK TIME

Fixes are available

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/C++ for AIX, V11.1
October 2012 PTF for XL 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
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

  • When compiling a test case that makes use of inline asm, you may
    get a link error related to non virtual thunks.
    
    Below is an example of the error message you may see:
    $ //Link step
    .
    .
    echo Linking...
    `_ZThn4_N7madness19DependencyInterfaceD1Ev' referenced in
    section `.rodata' of libMADworld.a(worldtask.o): defined in
    discarded section
    `.gnu.linkonce.t._ZThn4_N7madness19DependencyInterfaceD1Ev' of
    libMADworld.a(worldtask.o)
    `_ZThn4_N7madness19DependencyInterfaceD0Ev' referenced in
    section `.rodata' of libMADworld.a(worldtask.o): defined in
    discarded section
    `.gnu.linkonce.t._ZThn4_N7madness19DependencyInterfaceD0Ev' of
    libMADworld.a(worldtask.o)
    $
    
    If you do a c++filt on the above symbols, you get:
    $c++filt _ZThn4_N7madness19DependencyInterfaceD1Ev
    non-virtual thunk to
    madness::DependencyInterface::~DependencyInterface()
    $
    

Local fix

  • n/a
    

Problem summary

  • USERS AFFECTED:
    Users using assembly and C++ thunks may be affected by this
    issue.
    
    PROBLEM DESCRIPTION:
    GNU linker (ld) reports link errors when xlCcode generates c++
    thunk sections. The reason is c++ thunk sections are made as
    'linkonce' but will be referred locally from .rodata.
    In this condition, since there may be section discarded (from
    different object files), ld can not guarantee the reference is
    local.
    Therefore the error is reported.
    

Problem conclusion

  • The compiler has been fixed to make the 'linkonce' symbols
    globally week, which eliminates this error.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV18499

  • 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

    2012-03-29

  • Closed date

    2012-03-29

  • Last modified date

    2012-03-29

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

    LI76610

  • 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



Document information

More support for: XL C for AIX

Software version: 11.1

Reference #: IV18499

Modified date: 29 March 2012