Subject: big C++ programs won't link?
From: Stephen Williams (steve@icarus.com)
Date: Sat Nov 27 1999 - 21:00:13 AKST
I have a *really*big* C++ file (machine generated) that won't link on
Linux/alpha. It appears to work everywhere else, so it seems to be unique
to the alpha:
+ g++ -O -rdynamic -fno-exceptions -Ivvm -Ivpi -Lvvm foo.cc -lvvm -ldl
/usr/bin/ld: /tmp/ccLUGdgi.o: .got subsegment exceeds 64K (size 137792)
/usr/bin/ld: failed to set dynamic section sizes: No such file or directory
collect2: ld returned 1 exit status
52.3% CPU (Elapsed=20:18.82, sys=6.675, user=631.040)
icarus.com % gcc -v
Reading specs from /usr/lib/gcc-lib/alpha-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
icarus.com % ld -v
GNU ld version 2.9.1 (with BFD 2.9.1.0.24)
icarus.com % rpm -q binutils
binutils-2.9.1.0.23-7
(Yes, it really did take 20 minutes to compile, but I had another niced
program running that may have taken some CPU away from the compiler.)
What is the .got section and why is it limited to 64K? And most important,
how can I adjust the code generator so that the problem goes away? Or can
I change some compiler switches?
FYI: foo.cc is generated by a Verilog compiler. The program is a gate level
simulation of a combinational 16x16 multiplier. The Verilog source is 3028
lines, and the generated C++ file is 36549 lines. People have run the complete
simulation on Linux/Intel systems (using the same Verilog and egcs) just fine.
-- Steve Williams "The woods are lovely, dark and deep. steve@icarus.com But I have promises to keep, steve@picturel.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep."-- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
This archive was generated by hypermail 2a23 : Sat Nov 27 1999 - 21:00:46 AKST