Fix for G++ not knowing whether a vtable will be private or public when the TOC reference is updated
From-SVN: r12605
This commit is contained in:
parent
2eee5e3abb
commit
581bc4de55
@ -4128,6 +4128,22 @@ output_toc (file, x, labelno)
|
||||
|
||||
fputs ("[TC],", file);
|
||||
}
|
||||
|
||||
/* 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.", real_name, 4))
|
||||
{
|
||||
RS6000_OUTPUT_BASENAME (file, real_name);
|
||||
if (offset < 0)
|
||||
fprintf (file, "%d", offset);
|
||||
else if (offset > 0)
|
||||
fprintf (file, "+%d", offset);
|
||||
}
|
||||
else
|
||||
output_addr_const (file, x);
|
||||
putc ('\n', file);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user