This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: AIX vtable issues
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: AIX vtable issues
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Tue, 06 Feb 2001 11:09:34 -0500
- cc: gcc at gcc dot gnu dot org
>>>>> Mark Mitchell writes:
Mark> For example:
Mark> .toc
Mark> LC..0:
Mark> .tc _ZTT4MostIiE[TC],_ZTT4MostIiE[RW]
Mark> ...
Mark> .csect _test.rw_C[RW],3
Mark> .align 2
Mark> _ZTT4MostIiE:
Mark> .long _ZTV4MostIiE[RW]+12
Mark> .long _ZTC4MostIiE0_2D1IiE[RW]+12
Mark> .long _ZTC4MostIiE4_2D2IiE[RW]+12
Mark> .long _ZTV4MostIiE[RW]+24
Mark> This reults in _ZTT4MostIiE being undefined at link time.
Mark> What's going on here? (I have the feeling you might have explained
Mark> this before, but I can't quite piece it together.)
This may have to do with the following code in
rs6000.c:output_toc():
/* Currently C++ toc references to vtables can be emitted before it
is decided whether the vtable is public or private. If this is
the case, then the linker will eventually complain that there is
a TOC reference to an unknown section. Thus, for vtables only,
we emit the TOC reference to reference the symbol and not the
section. */
if (strncmp ("_vt.", name, 4) == 0)
{
RS6000_OUTPUT_BASENAME (file, name);
if (offset < 0)
fprintf (file, "%d", offset);
else if (offset > 0)
fprintf (file, "+%d", offset);
}
I assume that vtables no longer have "_vt." in their name, so this code is
not being invoked. This code needs to check for whatever additional
substring designates a virtual function table.
David