Bug 33355
Summary: | gcc/ld ia64 relocation truncated to fit: PCREL21B | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | John Reiser <jreiser> |
Component: | binutils | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED WORKSFORME | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | paul |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | ia64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2001-03-27 17:10:27 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
John Reiser
2001-03-27 05:40:49 UTC
Here is a recipe to reproduce: Compile and run the generator program genfunc2.c, getting 1024 f*.c files, each with one function which calls all the rest. Compile the f*.c files, and load with a main(). Each f*.o has 32KB of .text; 1024 of them total 32MB. So the problem is: being hobbled by 20(21?) bit offset field in br.call instruction, with no compile flag that generates code some other way for very large programs. -----genfunc2.c #include <stdio.h> main() { int f0,f1,g,h; for (h=0; h<1024; ++h) { char buf[10]; FILE *file; sprintf(buf, "f%d.c", h); file = fopen(buf, "w"); for (f0=0; f0<128; ++f0) { fprintf(file, "extern void "); for (f1=8; --f1>=0; ) { fprintf(file, "f%d()%s", (f0<<3)|f1, ((0!=f1) ? "," : ";\n") ); } } fprintf(file, "void f%d(){\n", h); for (f0=0; f0<128; ++f0) { fprintf(file, "\t"); for (f1=8; --f1>=0; ) if (h!=((f0<<3)|f1)) { fprintf(file, "f%d();", (f0<<3)|f1 ); } fprintf(file, "\n"); } fprintf(file, "}\n"); fflush(file); fclose(file); } return 0; } -----end genfunc2.c ----main.c extern void f128(); main() { f128(); } ----end main.c -----shell commands gcc genfunc2.c ./a.out gcc -c f*.c gcc main.o f*.o -----end shell commands -----output ... f0.o(.text+0x7c02): relocation truncated to fit: PCREL21B f999 f0.o(.text+0x7c22): relocation truncated to fit: PCREL21B f998 f0.o(.text+0x7c42): relocation truncated to fit: PCREL21B f997 f0.o(.text+0x7c62): relocation truncated to fit: PCREL21B f996 f0.o(.text+0x7c82): relocation truncated to fit: PCREL21B f995 f0.o(.text+0x7ca2): relocation truncated to fit: PCREL21B f994 ... ----- -Wl,-relax should cure this. |