Fixes are available
XL C/C++ for Linux Fix Pack 8 (October 2015 Update) for 12.1
XL C/C++ for Linux Fix Pack 4 (October 2013 Update) for 12.1
XL C/C++ for Linux Fix Pack 5 (December 2013 Update) for 12.1
XL C/C++ for Linux Fix Pack 6 (February 2014 Update) for 12.1
XL C/C++ for Linux Fix Pack 7 (May 2014 Update) for 12.1
APAR status
Closed as program error.
Error description
The source file compiled with -g issues the following error: ../../../../bin/../lib/libldb-rand.o:(.text+0x90): undefined reference to `__tls_get_addr' at link time.
Local fix
Do not use -g with noopt, or use optimization -O2(-O3) with -g
Problem summary
link failure - undefined reference to `__tls_get_addr' with -g The linker requires thread local storage references to be of the form 0| 0017B0 addi 38620000 1 L8 gr3=.Cpv_expIOFlushFlag_<<208>>(gr2,0) 3734| 0017C0 bl 48000001 1 CALLN gr3=__tls_get_addr<<2192>>,1,gr3,__tls_get_addr 3734| 0017C4 ori 60000000 1 There is a relocation on the load from the toc . There can be instructions in between as long as they do not require relocation. In this case, there were 2 identical references in the same extended basic block. The CALLN was commoned. We didn't common the load because of the -g (storage can be changed in the debugger), so we had a dead toc load with no corresponding call to __tls_get_addr and the linker complained.
Problem conclusion
Allow red_pl to remove loads from the toc even with -g since the toc cannot be changed from the debugger.
Temporary fix
Comments
APAR Information
APAR number
LI77670
Reported component name
XL C/C++ FOR LI
Reported component ID
5725C7300
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-10-28
Closed date
2013-10-28
Last modified date
2013-10-28
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 LI
Fixed component ID
5725C7300
Applicable component levels
RC10 PSN LI77397
UP06/09/13
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.1","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
14 October 2021