Linker Tools Warning LNK4072

section count count exceeds max (number); image may not run

The number of sections (a COFF .EXE or .DLL file is composed of sections, similar to segments) in the output file is greater than the limit that can be handled by the loader.

You can define your own sections using the data_seg, code_seg, and alloc_text pragmas. For example, the following program defines three sections called .a1, .a2, and .a3.

#pragma data_seg(".a1")
int a1 = 1;
#pragma data_seg(".a2")
int a2 = 2;
#pragma data_seg(".a3")
int a3 = 3;

void main (void) {
   ;
}

You can view the names of the sections in your executable file by using the DUMPBIN program with the default /SUMMARY option. See the DUMPBIN Reference for more information.

To reduce the number of sections in your executable file: