What fixed weak symbols/template code between 3.0 and 3.0.1 CVS?

Richard Chan cshihpin@dso.org.sg
Sun Aug 5 19:32:00 GMT 2001


Hi, I am curious to know what recent changed in 3.0.1 CVS has fixed a weak 
symbol/template code problem I have encounterd.


When trying to compile Crypto++ v.4.1 from http://www.eskimo.com
using GCC 3.0 and GCC 3.0.1 CVS. I observed the following:

With GCC 3.0 release some weak symbols in templated code were
not being emitted, so linking failed. Example is the ec2n.cpp file.

Output of 3.0 release
000019d0 T _ZNK8CryptoPP4EC2N6DoubleERKNS_9EC2NPointE

Output of 3.0.1 CVS
00000000 W _ZNK8CryptoPP13AbstractGroupINS_9EC2NPointEE6DoubleERKS1_
000010d0 T _ZNK8CryptoPP4EC2N6DoubleERKNS_9EC2NPointE

(BTW the class EC2N publically inherits fm the template
AbstractGroup<EC2NPoint>.)

As you can see the W symbol was not being emitted in 3.0. This 
caused some linker failures later on.

BTW GCC 3.0.1 CVS can now successfully compile Crypto++ V4.1 (with very minor
fixes) and pass the validation test.


Cheers
Richard 




More information about the Gcc mailing list