header file inline causing problems
Ranjit Mathew
rmathew@gmail.com
Thu Apr 7 06:50:00 GMT 2005
Steve Pribyl wrote:
>
> I am getting duplicate methods in my libgcj.a on mingw and it looks like it is
> caused by a problem with an inline function in the header.
[...]
>
> mingw$ nm libgcj.a
> 00000000 t .text$_ZN4java4util7logging6Logger7getNameEv
> 00000000 T __ZN4java4util7logging6Logger7getNameEv
> 00000890 T __ZN4java4util7logging6Logger7getNameEv
On Linux, I see only one symbol here. In addition, natLogger.o
has a weakly-defined getName() ("W" in nm's notation).
Since natLogger.cc doesn't explicitly define getName(), I guess
this is the result of a funky interaction between using
#pragma interface/implementation and weak symbols support:
http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Interface.html
But 4.0 should have weak symbols support for Cygwin/MinGW:
http://gcc.gnu.org/ml/gcc-cvs/2004-11/msg00265.html
So I am confused...
Maybe you can create a simple C++ testcase demonstrating
this problem on MinGW and submit a PR. If possible, also
test that testcase with GCC 3.4.x and see if it is a
regression on Win32.
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.hostingzero.com/
More information about the Java
mailing list