Next: , Previous: Global Variables, Up: Variables   [Contents][Index]


4.3 Register Variables

Register variables have their own stab type, N_RSYM (C_RSYM for XCOFF), and their own symbol descriptor, ‘r’. The stab’s value is the number of the register where the variable data will be stored.

AIX defines a separate symbol descriptor ‘d’ for floating point registers. This seems unnecessary; why not just just give floating point registers different register numbers? I have not verified whether the compiler actually uses ‘d’.

If the register is explicitly allocated to a global variable, but not initialized, as in:

register int g_bar asm ("%g5");

then the stab may be emitted at the end of the object file, with the other bss symbols.