[RFC PATCH] Don't use ELF weak for entities with vague linkage when COMDAT groups are available

Mark Mitchell mark@codesourcery.com
Thu Apr 14 20:28:00 GMT 2005


Julian Brown wrote:

> I have tried the building a gcc on x86-64 with the vanilla binutils from 
> SuSE 9.2 built from source, and it doesn't exhibit this problem. With 
> SuSE patches applied, the build fails for for me (on a non-SuSE system). 
> So in this case, the problem would appear to be one of the SuSE patches.

It sounds like we need an autoconf test.  That's going to be a bit of a 
pain, in that I guess we need to both assemble and link something.

We could do:

   as -o conftest.o conftest.s
   ld -r -o /dev/null conftest.o conftest.o

to make sure that COMDAT works.  But, the linker warnings Diego is 
seeing probably wouldn't show up, as that only happens when symbols have 
different sizes in the two object files.

So, should we just fall back to have an --enable-comdat switch?  On by 
default if the current HAVE_GAS_COMDAT says that the assembler has 
COMDAT; off by default otherwise?  That way people could configure with 
--disable-comdat if they have assemblers/linkers that only partially 
support COMDAT.  Thoughts?

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



More information about the Java-patches mailing list