Linkonce vs comdat

Matt Austern austern@apple.com
Mon Sep 22 23:16:00 GMT 2003


I'm getting confused about whether the linkonce scheme that the  
compiler uses on ELF systems (i.e. with sections that have names like  
.gnu.linkonce.t.foo) is supposed to be the same thing as the COMDAT  
scheme that's described in  
http://www.codesourcery.com/cxx-abi/abi/prop-72-comdat.html.  It  
doesn't look like the same thing; I have the sense that the word COMDAT  
is being used in at least two senses.  but, as I said, I'm confused.   
Quite possible I'm missing something.

Perhaps one of the things that I'm missing is the documentation.  I  
couldn't find anything in the ld documentation that said exactly what  
it did with gnu.linkonce sections.  In the compiler documentation I did  
find a brief discussion in the user manual  
(http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Vague- 
Linkage.html#Vague%20Linkage) and nothing in the internals manual.  So  
mostly I'm just trying to trace this through the source code.  If  
there's somewhere better for me to be looking, I'd appreciate a pointer.

			--Matt



More information about the Gcc mailing list