gccint: Uninitialized Data

1 
1 18.20.3 Output of Uninitialized Variables
1 -----------------------------------------
1 
1 Each of the macros in this section is used to do the whole job of
1 outputting a single uninitialized variable.
1 
1  -- Macro: ASM_OUTPUT_COMMON (STREAM, NAME, SIZE, ROUNDED)
1      A C statement (sans semicolon) to output to the stdio stream STREAM
1      the assembler definition of a common-label named NAME whose size is
1      SIZE bytes.  The variable ROUNDED is the size rounded up to
1      whatever alignment the caller wants.  It is possible that SIZE may
1      be zero, for instance if a struct with no other member than a
1      zero-length array is defined.  In this case, the backend must
1      output a symbol definition that allocates at least one byte, both
1      so that the address of the resulting object does not compare equal
1      to any other, and because some object formats cannot even express
1      the concept of a zero-sized common symbol, as that is how they
1      represent an ordinary undefined external.
1 
1      Use the expression 'assemble_name (STREAM, NAME)' to output the
1      name itself; before and after that, output the additional assembler
1      syntax for defining the name, and a newline.
1 
1      This macro controls how the assembler definitions of uninitialized
1      common global variables are output.
1 
1  -- Macro: ASM_OUTPUT_ALIGNED_COMMON (STREAM, NAME, SIZE, ALIGNMENT)
1      Like 'ASM_OUTPUT_COMMON' except takes the required alignment as a
1      separate, explicit argument.  If you define this macro, it is used
1      in place of 'ASM_OUTPUT_COMMON', and gives you more flexibility in
1      handling the required alignment of the variable.  The alignment is
1      specified as the number of bits.
1 
1  -- Macro: ASM_OUTPUT_ALIGNED_DECL_COMMON (STREAM, DECL, NAME, SIZE,
1           ALIGNMENT)
1      Like 'ASM_OUTPUT_ALIGNED_COMMON' except that DECL of the variable
1      to be output, if there is one, or 'NULL_TREE' if there is no
1      corresponding variable.  If you define this macro, GCC will use it
1      in place of both 'ASM_OUTPUT_COMMON' and
1      'ASM_OUTPUT_ALIGNED_COMMON'.  Define this macro when you need to
1      see the variable's decl in order to chose what to output.
1 
1  -- Macro: ASM_OUTPUT_ALIGNED_BSS (STREAM, DECL, NAME, SIZE, ALIGNMENT)
1      A C statement (sans semicolon) to output to the stdio stream STREAM
1      the assembler definition of uninitialized global DECL named NAME
1      whose size is SIZE bytes.  The variable ALIGNMENT is the alignment
1      specified as the number of bits.
1 
1      Try to use function 'asm_output_aligned_bss' defined in file
1      'varasm.c' when defining this macro.  If unable, use the expression
1      'assemble_name (STREAM, NAME)' to output the name itself; before
1      and after that, output the additional assembler syntax for defining
1      the name, and a newline.
1 
1      There are two ways of handling global BSS.  One is to define this
1      macro.  The other is to have 'TARGET_ASM_SELECT_SECTION' return a
11      switchable BSS section (⇒
      TARGET_HAVE_SWITCHABLE_BSS_SECTIONS).  You do not need to do
1      both.
1 
1      Some languages do not have 'common' data, and require a non-common
1      form of global BSS in order to handle uninitialized globals
1      efficiently.  C++ is one example of this.  However, if the target
1      does not support global BSS, the front end may choose to make
1      globals common in order to save space in the object file.
1 
1  -- Macro: ASM_OUTPUT_LOCAL (STREAM, NAME, SIZE, ROUNDED)
1      A C statement (sans semicolon) to output to the stdio stream STREAM
1      the assembler definition of a local-common-label named NAME whose
1      size is SIZE bytes.  The variable ROUNDED is the size rounded up to
1      whatever alignment the caller wants.
1 
1      Use the expression 'assemble_name (STREAM, NAME)' to output the
1      name itself; before and after that, output the additional assembler
1      syntax for defining the name, and a newline.
1 
1      This macro controls how the assembler definitions of uninitialized
1      static variables are output.
1 
1  -- Macro: ASM_OUTPUT_ALIGNED_LOCAL (STREAM, NAME, SIZE, ALIGNMENT)
1      Like 'ASM_OUTPUT_LOCAL' except takes the required alignment as a
1      separate, explicit argument.  If you define this macro, it is used
1      in place of 'ASM_OUTPUT_LOCAL', and gives you more flexibility in
1      handling the required alignment of the variable.  The alignment is
1      specified as the number of bits.
1 
1  -- Macro: ASM_OUTPUT_ALIGNED_DECL_LOCAL (STREAM, DECL, NAME, SIZE,
1           ALIGNMENT)
1      Like 'ASM_OUTPUT_ALIGNED_LOCAL' except that DECL of the variable to
1      be output, if there is one, or 'NULL_TREE' if there is no
1      corresponding variable.  If you define this macro, GCC will use it
1      in place of both 'ASM_OUTPUT_LOCAL' and 'ASM_OUTPUT_ALIGNED_LOCAL'.
1      Define this macro when you need to see the variable's decl in order
1      to chose what to output.
1