[Bug target/43745] [avr] g++ puts VTABLES in SRAM

tfrancuz at mp dot pl gcc-bugzilla@gcc.gnu.org
Thu Nov 24 22:14:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43745

--- Comment #5 from Tomasz Francuz <tfrancuz at mp dot pl> 2011-11-24 21:56:17 UTC ---
Ok, here is the code:
class test
{
 public:
  test() {};
  virtual void vfunction();
};

void test::vfunction()
{
}


int main()
{
}

After compilation 6 bytes of SRAM is occupied by test object vtable. Here is a
resulting part of map file:
*(.data)
 .data          0x00800100        0x0
c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr51/crtm128.o
 .data          0x00800100        0x6 gpp.o
                0x00800100                vtable for test
 .data          0x00800106        0x0
c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/avr51\libgcc.a(_exit.o)
 *(.data*)



More information about the Gcc-bugs mailing list