[Bug c/41644] New: -minimal-toc not helping for toc section exceeding 64k
sathishpy at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Oct 9 10:50:00 GMT 2009
I have an in-house debugger which uses some auto generated files having too
many string constants. Compiling this (with gcc 4.3) always fails with the
error
/tmp/ccrzE6fi.s: Assembler messages:
/tmp/ccrzE6fi.s:95429: Warning: TOC section size exceeds 64k
/tmp/ccCSriww.o:(.text+0x22672): relocation truncated to fit: R_PPC64_TOC16_DS
against `.toc'+10000
/tmp/ccCSriww.o:(.text+0x2267e): relocation truncated to fit: R_PPC64_TOC16_DS
against `.toc'+10008
/tmp/ccCSriww.o:(.text+0x2268a): relocation truncated to fit: R_PPC64_TOC16_DS
against `.toc'+10010
/tmp/ccCSriww.o:(.text+0x22696): relocation truncated to fit: R_PPC64_TOC16_DS
against `.toc'+10018
/tmp/ccCSriww.o:(.text+0x226a2): relocation truncated to fit: R_PPC64_TOC16_DS
against `.toc'+10020
/tmp/ccCSriww.o:(.text+0x226ae): relocation truncated to fit: R_PPC64_TOC16_DS
against `.toc'+10028
/tmp/ccCSriww.o:(.text+0x226ba): relocation truncated to fit: R_PPC64_TOC16_DS
against `.toc'+10030
/tmp/ccCSriww.o:(.text+0x226c6): relocation truncated to fit: R_PPC64_TOC16_DS
against `.toc'+10038
/tmp/ccCSriww.o:(.text+0x22706): relocation truncated to fit: R_PPC64_TOC16_DS
against `.toc'+10040
/tmp/ccCSriww.o:(.text+0x22712): relocation truncated to fit: R_PPC64_TOC16_DS
against `.toc'+10048
/tmp/ccCSriww.o:(.text+0x2271e): additional relocation overflows omitted from
the output
collect2: ld returned 1 exit status
I have tried using -mminimal-toc and other options, but Âminimal-toc is giving
a different set of errors like
/tmp/cc4SUbmt.s:97184: Error: operand out of range (0x0000000000009918 is not
between 0xffffffffffff8000 and 0x0000000000007ffc)
/tmp/cc4SUbmt.s:97187: Error: operand out of range (0x0000000000009920 is not
between 0xffffffffffff8000 and 0x0000000000007ffc)
/tmp/cc4SUbmt.s:97190: Error: operand out of range (0x0000000000009928 is not
between 0xffffffffffff8000 and 0x0000000000007ffc)
/tmp/cc4SUbmt.s:97193: Error: operand out of range (0x0000000000009930 is not
between 0xffffffffffff8000 and 0x0000000000007ffc)
/tmp/cc4SUbmt.s:97196: Error: operand out of range (0x0000000000009938 is not
between 0xffffffffffff8000 and 0x0000000000007ffc)
A similar issue was reported in gcc bugzilla bug 34708 (for gcc 4.3), for which
the resolution says fixed in mainstream. I have tried the same with gcc 4.4.1,
but that didnÂt help either.
I have attached a test program similar to my application to reproduce
this[compiled as: gcc -m64 -o toctest [-mno-fp-in-toc -mno-sum-in-toc
|-mminimal-toc] toctest.c]
--
Summary: -minimal-toc not helping for toc section exceeding 64k
Product: gcc
Version: 4.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sathishpy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41644
More information about the Gcc-bugs
mailing list