From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@lucon.org (H.J. Lu) To: martin@mira.isdn.cs.tu-berlin.de Cc: jgg@ualberta.ca, libc-hacker@sourceware.cygnus.com (GNU C Library), drepper@cygnus.com (Ulrich Drepper), ian@cygnus.com (Ian Lance Taylor), binutils@sourceware.cygnus.com Subject: Re: Serious C++ linking error Date: Sun, 04 Jul 1999 16:51:00 -0000 Message-id: <19990704235138.E65F557B9@ocean.lucon.org> X-SW-Source: 1999-q3/msg00031.html I am enclosing a simplified testcase for the bug. It is a very complicated bug due to the weak symbol handling in glibc and gld. It doesn't happen on Solaris where weak symbols in DSO are treated as strong and the dynamic linker treats all weak symbols as strong. I don't know if there is a reasonable fix from glibc or gld. I tend to believe the bug is in g++. Basically under glibc, for the same symbol, g++ has to make it either weak or strong in all cases, compiler-generated or not. Otherwise, bad things can happen. -- H.J. Lu (hjl@gnu.org) -- begin 644 shared.tar.gz M'XL(`"CL?S<``^U876_:,!3E%?^*.\HFJ$@:FWQ(9-U6T76:MJE5^]"'=9-" MXH"WX%0AB$[3_OOLA*1`H;330A_J\Y`0V]?WVK['/G@R\A(:D(-:A0#3<"P+ M:@#8L0SY!MPEV7L.`\!VNHYCVT;7$;6&Z9`:6%4&56`Z2;T$H#;Z$=W;3C0+ MPUT$M%M,YNL?QK'N5^0#&X9MFIO7'SMFL?[$$HD"&%L&KH%143Q+>.;KO\>X M'TT#"J\G:Z,"K6_.V*]HF-)TF?+'817_04X]=X9;_7[R?-&01K<+' M%OYCT^@6_.\2T0`P(=A1_-\%^B>?CSY<'&JGH`T1.CL_%1^2S%@^",RRG_)) M$!+<[4&SE35JHWH8)Q`"XV61"T$,U!_%T#B?C(6U66RPKZ< MBWTQ`4]-P2=%L?_G25&-CVWZSR2XU'\V-J7^L[M*_^T$>RP,:`@9Q_:N$V\X M]F!&O9\+`G"M'MRCT62U1I;R@(5SL2C9+<2B.__*I6.N))%,MUQ((A$!&"@[ M%UH+`E$>#WD';223Q!O$29IUD+M>$*#TAOJ=;%N[1X(6[J$,JPBVE*?&,Q2E M!?_U83!@G*55^-C&?\"VX'_7PL0B#L92_PD%J/B_"PP2279!#I1,^7-+?H62 M_YD2J\C'-OX3Q[Z]_S&S^Q_3-A7_=X%U]S\/T03_*@KD?Z+5"Z3\_!85Z@9) ;04%!04%!04%!04%!04%!X;_C+^),&@L`*``` ` end