APAR status
Closed as program error.
Error description
When linking with the -qtwolink option, the static destructor __sterm...() function for a library is removed by the linker, resulting in missed or incorrect (i.e. NULL) entries in the __cdtors table used by the runtime to construct/initialize and destruct/deinitialize static objects. Depending on the __cdtors entry, this may result in a runtime segmentation fault.
Local fix
Use `-bcdtors:mbr:0:s` in place of `-qtwolink`.
Problem summary
The AIX linker is removing the __sterm...() static destructor function from libraries when -qtwolink is used due to there not being any link/connection between __sinit...() and __sterm...().
Problem conclusion
Changes were made to link __sinit...() and __sterm...() together so that the AIX linker no longer removes __sterm...().
Temporary fix
Comments
APAR Information
APAR number
IJ21106
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
G10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2019-11-25
Closed date
2022-08-01
Last modified date
2022-08-01
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL C/C++ FOR AI
Fixed component ID
5725C7200
Applicable component levels
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"G10","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
01 August 2022