Intel® C++ Compiler for Linux* - Linker Reports "short data section overflowed" when Short Data Exceeds 2MB

The linker reports "short data section overflowed" when the size of the short data section exceeds 2MB. The short data section can accommodate up to 256,000 entries of 8 bytes. If this capacity is exceeded, the message "short data section overflowed" is generated at link time. The following steps may be tried in order to alleviate this problem, in order:

  1. On Linux*, update your version of ld to the one in binutils 2.13 or later. Earlier versions generate unnecessary short data section entries.

  2. For C or Fortran, where possible, allocate short data locally rather than globally. (In the Intel® Fortran Compiler, local scalars are allocated automatically on the stack, unless -save or a SAVE statement is used.

  3. Avoid making many explicit references to single array elements, e.g., for Fortran, A(1), A(2), A(3), A(4), etc. This sometimes occurs in automatically generated codes.

  4. For Fortran, group static scalars together into a single common block, to reduce the number of short data section entries.

  5. Increasing the optimization level may sometimes reduce the number of symbols that need to be kept in the short data section.

  6. The linker options -G0 or --gpsize=0 may sometimes reduce the number of short data section entries.
For more complete information about compiler optimizations, see our Optimization Notice.