This is the mail archive of the
mailing list for the GCC project.
Re: TOC problems
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Adam Courchesne <courches at us dot ibm dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 08 Feb 2002 13:02:54 -0500
- Subject: Re: TOC problems
>>>>> Adam Courchesne writes:
Adam> I've been having problems linking with gcc.
Adam> It gives me a TOC error saying that I exceded th 64k limit.
Adam> I try to pass the -mno-fop-in-toc and -mno-sum-in-toc flags but it says
Adam> that they are invalid flags. (Even though they are displayed in the man
Adam> Are these options architecture dependant? I'm Runing AIX 126.96.36.199 on an
Adam> IBM 44P Model 170 RISC box.
-mno-fp-in-toc, -mno-sum-in-toc, and -mminimal-toc are
compile-time options, not link-time options. I would highly recommend
just using -mminimal-toc.
You need to (re-)compile all of your object files with the option.
Those options will not fix anything at the link stage once you have
encountered the linker error.
The AIX linker provides the -bbigtoc option which you can invoke
from the GCC commandline using -Wl,-bbigtoc to pass an option to the
linker. -bbigtoc will fix up the linker error at link time, but has a
higher performance penalty than -mminimal-toc. -mminimal-toc has a
negligible performance impact.