GCC uses the AIX assembler and probably is the most heavy user of the assembler of all applications on AIX (IBM XL compilers generate object code directly). An upgrade to the AIX assembler has introduced a bug that can generate invalid object files. This is an AIX bug, not a GCC bug. The broken assembler is distributed in all latest service packs of all - as of July 21st, 2011 - supported AIX versions:
- AIX V7.1 TL00
- AIX V6.1 TL06
- AIX V6.1 TL05
- AIX V6.1 TL04
- AIX V6.1 TL03
- AIX5L V5.3 TL12
- AIX5L V5.3 TL11
- AIX5L V5.3 TL10
Thus, you most probably run into the following situation:
- you updated to the latest AIX service pack for your current AIX level and suddenly a previously working GCC stops working now.
The following AIX versions don't have the broken assember:
- AIX V7.1 TL01
- AIX V6.1 TL07
Please check out the simple solution/workaround at the end of this page!
GCC error message
gcc -g ..." fails with an error message similar like that:
ld: 0711-596 SEVERE ERROR: Object xxx.o
An RLD for section 2 (.data) refers to symbol 111,
but the storage class of the symbol is not C_EXT or C_HIDEXT.
The source file contains implicitly initialized global symbols.
Please check also the GCC bugzilla entry Bug 46072 - AIX linker chokes on debug info for uninitialized static variables for further details.
A number of PMRs have been reported about the problem. There is a fix available for AIX5L V5.3 TL10, TL11 and TL12 and fixes are available now also for the affected AIX V6.1 and AIX V7.1 versions.
Please see further below for details.
List of APARs with fixes available:
- AIX V7.1 TL00: IZ99107
- AIX V6.1 TL06: IZ98226
- AIX V6.1 TL05: IZ98732
- AIX V6.1 TL04: IV00150
- AIX V6.1 TL03: IZ98861
- AIX5L V5.3 TL12: IZ98134
- AIX5L V5.3 TL11: IZ98477
- AIX5L V5.3 TL10: IZ98385
- If the version of the AIX assembler located in
/usr/ccs/bin/as (contained in the AIX fileset
bos.adt.base) is broken, a simple solution/workaround is to just use the assembler of a previous AIX version where the error didn't exhibit.
- Please note that upgrading to a fixed version mentioned in the list above is the preferred solution!
- For instance, I used the AIX V6.1 TL00 assembler for creating all GCC RPMs for AIX V7.1 (which at that time did not have any working assembler). This could be accomplished as follows:
# cd /usr/ccs/bin
# mv as as.ORIG
# cp <YOUR WORKING ASSEMBLER COPY FROM A PREVIOUS AIX LEVEL> as.61TL00
# ln -s as.61TL00 as
- Using this "trick" I could easily build all GCC RPMs for AIX V7.1.
- You have to use this "trick" as long until real fixes are available for AIX V6.1 an V7.1.
- You do not have to use exactly that assembler version, you can use any AIX V6.1 version that is not affected by the error decribed above!
- Please understand that I can not provide you a copy of a working AIX assembler for license/legal reasons!