🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #23055

Re: IBM PowerPC/AIX 3.2.5 linking problems

#23055
From: Richard G. Hash
Date: Tue, 11 Oct 1994 17:17
49 lines
3160 bytes
In <CxB81o.IEt@beaver.cs.washington.edu> jdean@bergen.cs.washington.edu (Jeffrey Dean) writes:
> Linking compiler
> 0706-781 ERROR: TOC overflow. TOC size: 647000  Max size: 65536
> collect2: ld returned 12 exit status

>   a) Does anyone know how to increase this limit or work around it?

Call IBM and get the fixed linker.

>   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?

From an fax IBM sent me:
    From a source code point of view, TOC entries are used by:
      - each unique FORTRAN named or common uses 1 entry
      - each reference to a C global (extern) variable
      - each local function call that exceeds 64K in branch distance
      - each external function call
      - each C function pointer definition
      - each static area in a compilation unit uses 1 entry
        (all static variables uses only 1 entry)

>   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).

You can try "-mno-fp-in-toc", but you are so far over 64K it's not
going to make any difference. In the same fax IBM sent me, they describe
a tortuous method of using shared objects, but after a week of gnashing
my teeth and kicking holes in my wall, I *still* couldn't get mine under
64K. You are basically hosed.

Our alternatives (I started off around 70K though, not 647K!) was to
stop using gcc and use the IBM compiler, which doesn't put as much
junk in the TOC. With the size of your initial TOC I can't imagine that
will make any difference. Call IBM, they should be able to get you
the fixed linker.

> --------------------------------------------------------------------------
> 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

--
Richard G. Hash                                      email: rgh@shell.com
Shell Development Company, Bellaire Research Center  phone: (713) 245-7311
Member Team Ada                Free Ada94 compilers: cs.nyu.edu:/pub/gnat
Technical Details
Message-ID: <rgh.781895826@camo>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!pipex!uunet!psinntp!shellgate!camo!rgh
References: <CxB81o.IEt@beaver.cs.washington.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,50963b9885242fb2
X-Google-Attributes: gid11318c,public
X-Google-Thread: 102b75,50963b9885242fb2
X-Google-Attributes: gid102b75,public
X-Google-ArrivalTime: 1994-10-11 15:13:38 PST
Newsgroups: comp.arch,gnu.gcc.help
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!pipex!uunet!psinntp!shellgate!camo!rgh
From: Richard G. Hash <rgh@shell.com>
Subject: Re: IBM PowerPC/AIX 3.2.5 linking problems
Message-ID: <rgh.781895826@camo>
Sender: usenet@shellgate.shell.com (USENET News System)
Reply-To: rgh@shell.com
Organization: Shell Bellaire Research Center
References: <CxB81o.IEt@beaver.cs.washington.edu>
Date: Tue, 11 Oct 1994 17:17:06 GMT
Lines: 49