>>>>> Arnaud Charlet writes: Arnaud> Although I would need to see the entire issue we're trying to solve under Arnaud> AIX, since it's not clear at all to me that forcing -mminimal-toc Arnaud> systematically is a good idea to start with. Could you point to a detailed Arnaud> discussion on the AIX issue ?
AIX has a limit on the size of the TOC (similar to ELF GOT). The TOC provides global PIC addressibility and is used for global variables, static variables, and constants. The data sections patch will improve this situation by creating a local pool for constants and static variables, as IBM XLC has done from its initial implementation. -mminimal-toc instructs GCC to generate one TOC entry per function and use a side table for all addressibility in the function, reducing the size of the TOC to the number of functions in the executable or shared object, instead of the number of variables and constants. One can intermix object files compiled with and without the option. One also can fixup the TOC overflow in the linker, which is reasonably efficient for a small number of extra entries, but inefficient for a large overflow. When Ada builds on AIX, libada contains a very large number of TOC entries. Even the smallest, simplest executable overflows because the entire TOC is consumed by libada. Using this option when building libada compacts the library so that applications encounter TOC overflow less often. When the data section patch is merged into GCC, this may not be necessary, so maybe we should just declare GNU Ada unusable on AIX until that patch is committed. David