TOC overflow: >64K ld -b bigtoc...with egcs (g++) under AIX 4.2.1?

TOC overflow: >64K ld -b bigtoc...with egcs (g++) under AIX 4.2.1?

Post by Tim Gallaghe » Fri, 09 Oct 1998 04:00:00



I'm trying to compile KDE under AIX 4.2.1.  It requires g++ to compile.  No
problem, I've got egcs already compiled, which has g++ in it.  I get along fine
until I get to kfm, where I get the following linker error:

ld: 0711-781 ERROR: TOC overflow. TOC size: 115760    Maximum Size: 65536

The man page for ld talks about the -b bigtoc option for the loader 'ld'.  How
do I link it with the bigtoc option using g++?  I try ld directly on the command
line, and depending upon which loader I use (AIX's or egcs's) I get either
'__start' not found, or some other weirdness.  If I could get over this bigtoc
hurdle, I think I have kde ready.

RSVP via e-mail

Tim Gallagher

 
 
 

TOC overflow: >64K ld -b bigtoc...with egcs (g++) under AIX 4.2.1?

Post by Jim Mellande » Fri, 09 Oct 1998 04:00:00



> I'm trying to compile KDE under AIX 4.2.1.  It requires g++ to compile.  No
> problem, I've got egcs already compiled, which has g++ in it.  I get along fine
> until I get to kfm, where I get the following linker error:

> ld: 0711-781 ERROR: TOC overflow. TOC size: 115760    Maximum Size: 65536

> The man page for ld talks about the -b bigtoc option for the loader 'ld'.  How
> do I link it with the bigtoc option using g++?  I try ld directly on the command
> line, and depending upon which loader I use (AIX's or egcs's) I get either
> '__start' not found, or some other weirdness.  If I could get over this bigtoc
> hurdle, I think I have kde ready.

> RSVP via e-mail

> Tim Gallagher


try using the -mminimal-toc flag to your compiler.

 
 
 

TOC overflow: >64K ld -b bigtoc...with egcs (g++) under AIX 4.2.1?

Post by David Edelso » Mon, 12 Oct 1998 04:00:00


>>>>> Jim Mellander writes:

>> The man page for ld talks about the -b bigtoc option for the loader 'ld'.  How
>> do I link it with the bigtoc option using g++?  I try ld directly on the command
>> line, and depending upon which loader I use (AIX's or egcs's) I get either
>> '__start' not found, or some other weirdness.  If I could get over this bigtoc
>> hurdle, I think I have kde ready.

Jim> try using the -mminimal-toc flag to your compiler.

        The real answer to the question Tim asked is -Wl,-bbigtoc.  As
described in the GCC/EGCS documentation -Wl, or -Xlinker are the
commandline options to pass commandline arguments to the linker phase.
The commandline -b option means something different to GCC than it does to
XLC.

David

 
 
 

TOC overflow: >64K ld -b bigtoc...with egcs (g++) under AIX 4.2.1?

Post by Marcus Friedric » Fri, 16 Oct 1998 04:00:00



> I'm trying to compile KDE under AIX 4.2.1.  It requires g++ to compile.  No
> problem, I've got egcs already compiled, which has g++ in it.  I get along fine
> until I get to kfm, where I get the following linker error:

> ld: 0711-781 ERROR: TOC overflow. TOC size: 115760    Maximum Size: 65536

> The man page for ld talks about the -b bigtoc option for the loader 'ld'.  How
> do I link it with the bigtoc option using g++?  I try ld directly on the command
> line, and depending upon which loader I use (AIX's or egcs's) I get either
> '__start' not found, or some other weirdness.  If I could get over this bigtoc
> hurdle, I think I have kde ready.

> RSVP via e-mail

> Tim Gallagher


The linker has an Overflow (TOC=table of contents). AIX and the gcc can normaly
handle a TOC whith an maximum size of 64KB. You have to use the linkeroption
"bigtog". Edit the Makefiles which causes the problems (not all Makefiles!!). Then
the linker create/add a new code which uses a TOC > 65536.

You have to edit the g++/c++/cpp/... lines in the Makefiles:

Old lines:
.
.
CC = gcc
CPP = gcc -E
CXX = g++
.
.

New Lines:
.
.
CC = gcc -Xlinker -bbigtoc
CPP = gcc -E -Xlinker -bbigtoc
CXX = g++ -Xlinker -bbigtoc
.
.

Thats all. Good luck...

I have a RS/6000 whith AIX 4.2.0.0 and gcc 2.8.1.0 and the most programs work
fine.I can't compile some pakages (which uses sound,...). Do you have a solution
for the sound?

--
Dipl.-Ing. Marcus Friedrich
        iX - Magazin fr professionelle Informationstechnik
        Verlag Heinz Heise * Helstorfer Str. 7 * 30625 Hannover * Germany

 
 
 

1. AIX 4.1.5 GNU ld TOC overflow with gcc -mminimal-toc

Hello,
under IBM AIX 4.1.5,
our application (ANSI-C, C++) cannot be linked because of TOC overflow.
We get: TOC overflow: 0x4238c > 0x10000

Everything is compiled with GNU gcc/g++ 2.8.0 -mminimal-toc (as the
ld suggested after the overflow occurred).

Before we went to g++ (because of templates), we used xlc/xlC with
native ld and not TOC overflow problem existed.

Don't the native compilers use the TOC at all?
Can GNU gcc be configured to avoid TOC at all?
I thought we are already past the 16-bit times.

Can anybody help?
Thanks,
Ludwig

2. Embedded Linux Newsletter for

3. TOC overflow when compiling GTK on AIX

4. Token Ring Hell

5. TOC overflow on AIX/GNU C

6. FreeBSD and cvsd server problem

7. TOC overflow under AIX 4.1 ???

8. HELP!: Intellimouse locks desktop

9. nlink_t really allow >>>64k physical links??

10. TOC overflow error when trying to link

11. TOC Overflow

12. TOC overflow error in gcc

13. Building Pine TOC overflow ERROR