Article View: comp.arch
Article #23054IBM PowerPC/AIX 3.2.5 linking problems
From: Jeffrey Dean
Date: Fri, 07 Oct 1994 15:51
Date: Fri, 07 Oct 1994 15:51
58 lines
3212 bytes
3212 bytes
I tried posting this to comp.sys.powerpc, but it got lost in a sea of
Macintosh questions.
I'm using g++ 2.5.8 to try to port a largish C++ program to an IBM-41T
workstation running AIX 3.2.5, and I'm having trouble with the
linker. Our .o files get compiled successfully, but when we try and
link, we get the following error:
Linking compiler
0706-781 ERROR: TOC overflow. TOC size: 647000 Max size: 65536
collect2: ld returned 12 exit status
This is a pretty large executable (240 .o files, producing an
executable of 10-12 MB on the SPARC, so it's possible (likely?) that
we're overflowing some default size for the TOC (by an order of
magnitude, it appears). So, my questions are:
a) Does anyone know how to increase this limit or work around it?
b) Are there programming changes I can make that will cause things
to not be put in the TOC? How does the compiler/linker decide what
needs to go in the TOC?
c) Are there flags for gcc that will cause it to not put certain
things in the TOC, similar to the -qdatalocal for IBM's xlc compiler?
If so, this might reduce the size of the TOC (although it's unlikely
to cut it by an order of magnitude, I suppose).
I found the following info on IBM's WWW site, describing differences
between the older version of the linker/binder that I'm using and a
newer version that we don't have:
------
General Description of Major Binder Improvements
This binder has the following new features:
TOC Overflow Resolved: The AIX Version 3.2 binder generates XCOFF
with a TOC size limit of 64K bytes. The AIX Version 4.1 binder has
removed this limitation by creating second level TOC information. A
slight performance tradeoff is expected for an executable with huge
TOC (>64K) due to one extra level of indirection for TOC entries
beyond 64K limit.
------
I've looked at the man page for both gcc and ld, but they weren't very
illuminating.
Any advice would be appreciated (e-mail would be preferred).
Thanks,
-- Jeff
--------------------------------------------------------------------------
Jeffrey Dean (jdean@cs.washington.edu) Graduate Student
Dept. of Computer Science & Engineering University of Washington
http://www.cs.washington.edu/homes/jdean/index.html
--------------------------------------------------------------------------
Technical Details
Message-ID:
<CxB81o.IEt@beaver.cs.washington.edu>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!news.kei.com!MathWorks.Com!uhog.mit.edu!uw-beaver!bergen.cs.washington.edu!jdeanShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,50963b9885242fb2,start X-Google-Attributes: gid11318c,public X-Google-Thread: 102b75,50963b9885242fb2,start X-Google-Attributes: gid102b75,public X-Google-ArrivalTime: 1994-10-08 06:03:13 PST Newsgroups: comp.arch,gnu.gcc.help Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!news.kei.com!MathWorks.Com!uhog.mit.edu!uw-beaver!bergen.cs.washington.edu!jdean From: jdean@bergen.cs.washington.edu (Jeffrey Dean) Subject: IBM PowerPC/AIX 3.2.5 linking problems Message-ID: <CxB81o.IEt@beaver.cs.washington.edu> Sender: news@beaver.cs.washington.edu (USENET News System) Reply-To: jdean@cs.washington.edu Organization: University of Washington Date: Fri, 7 Oct 1994 15:51:07 GMT Lines: 58