[PATCH] Don't use weak linkage for symbols in COMDAT groups

Mark Mitchell mark@codesourcery.com
Mon Feb 28 21:52:00 GMT 2005


Daniel Jacobowitz wrote:
> On Sun, Feb 27, 2005 at 06:03:41PM +0000, Nathan Sidwell wrote:
> 
>>Daniel Jacobowitz wrote:
>>
>>>On Sat, Feb 26, 2005 at 11:22:49PM -0500, Andrew Pinski wrote:
>>
>>>>Before this change, a::f in the TU of file b and a were both marked as 
>>>>weak so
>>>>that they would not complain when you link the two files together.
>>>
>>>
>>>Why isn't a::f in a COMDAT group, anyway?

I agree that a::f should be in a COMDAT group, and that this is the root 
problem.  The C++ ABI requires a::f to be COMDAT.  I expect that if this 
problem is fixed, and the missing annotation is added to libjava, that 
Julian's patch will be OK.

Reverting the patch is the right thing for now.

Julian, do you think you can work out why the inline function isn't 
being placed in a COMDAT group?  (It's apparently being marked weak 
explicitly, rather than going through the more generic machinery.)  If 
it's not obvious with a little looking, please let me know, and I'll fix 
it.  Then you can retest your patch.

Thanks,

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304



More information about the Gcc-patches mailing list