From Bugzilla Helper: User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.5-15 i586) /tmp/ccGEUAnh.s:707300: Error: integer operand out of range This message (and several hundred thousand others like it) appears when compiling a large C file: 1000 functions, each of which returns the sum of values from calling all the rest. (This was fallout from tyring to generate a testcase which would tickle the loader message "R_PCREL21B: operand truncated" [or similar].) Reproducible: Always Steps to Reproduce: 1. compile & run the program to generate the large .c source file: gcc -o gen gen.c ./gen > big.c 2. compile the large .c file gcc big.c 3. -----generator program gen.c main() { int f,g; for (f=0; f<1000; ++f) { printf("static int f%d(int);\n",f); } for (f=0; f<1000; ++f) { printf( "static int f%d(int j){\n" " return 0\n" , f ); for (g=0; g<1000; ++g) if (g!=f) { printf( " +f%d(j)\n" , g); } printf("\t;\n}\n"); } printf("int main(){\n\treturn f500(5);\n}\n"); return 0; } -----end generator program Actual Results: ... /tmp/ccGEUAnh.s:707250: Error: integer operand out of range /tmp/ccGEUAnh.s:707260: Error: integer operand out of range /tmp/ccGEUAnh.s:707270: Error: integer operand out of range /tmp/ccGEUAnh.s:707280: Error: integer operand out of range /tmp/ccGEUAnh.s:707290: Error: integer operand out of range ... etc. Expected Results: No complaint. Compiling the large .c file takes about 1 hour.
And for this the answer is don't do that. Unlike the limitation on the size of code section within one binary/dso, limitation of a code section within one .o to 8MB does not seem too serious.
Would you please reconsider: The limitation above may not be too serious for hand-written code, but it quickly becomes serious for code-generation and code-instrumentation tools.