This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Linkonce vs comdat
- From: Matt Austern <austern at apple dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 22 Sep 2003 15:03:37 -0700
- Subject: Linkonce vs comdat
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