IBM Support

LI76793: NON VIRTUAL THUNK ERROR AT LINK TIME

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

    LI76793

  • Reported component name

    XL C/C++ FOR LI

  • Reported component ID

    5724X1400

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2012-05-24

  • Closed date

    2012-05-24

  • Last modified date

    2012-05-24

  • 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/C++ FOR LI

  • Fixed component ID

    5724X1400

Applicable component levels



Document information

More support for: XL C/C++ for Linux

Software version: B10

Reference #: LI76793

Modified date: 24 May 2012