------- Comment #9 from jakub at gcc dot gnu dot org 2009-10-12 10:12 ------- The documentation is correct. With -mminimal-toc you get just one entry in the .toc per TU. That TU's .toc entry then points into the middle of .toc1 section chunk with TOC stuff for that TU. And your problem is not .toc section overflow, but that the displacements within .toc1 section for that TU are too large (can be only signed 16 bit immediate, so for 8 byte addresses 8192 pointers). If you have many string literals, even when you split into multiple TUs, you'll need -mminimal-toc (otherwise .toc would overflow). If you have too many in one translation unit, there is at least currently no GCC option that will allow it to be compiled on ppc64. With the ppc64 ISA gcc in theory could do something similar to what SPARC does with -fPIC (unlike -fpic), where each toc load/store would instead of ld reg,someth...@toc(2) be lis tempreg,someth...@toc@hi; addis tempreg,tempreg,2; ld reg,someth...@toc@l(tempreg). But that would be something completely different from -mminimal-toc.
-- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amodra at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41644