Re: C++ objects with virtual tables in eeprom

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



jon.busenkell@xxxxxxx writes:

> I am wondering if anyone has ever implemented a __attribute__ or #pragma
> statement for use with constructors to specify to the compiler that the
> object does not exist in ram; therefore it can not just do a "MOV.L
> <reg>,<memory>" with the register containing the virtual tables address.
> The compiler I am presently using (from the chip vendor) does not take
> into account that C++ objects that have virtual tables, might reside in
> the eeprom. I am asking them to add this feature, and they are asking me
> if there is a standard way of handling this. Any thoughts would be
> greatly appreciated.

I don't really understand your question.  Is the EEPROM not
addressable?  That seems like a problem.

The usual gcc approach for handling these sorts of issues is to use a
variable attribute to put the variable in a specific section, and to
use the linker script to place that section appropriately, possibly
with different load and runtime addresses (see the GNU linker
documentation for details).  gcc's role is to support the variable
attribute and to ensure that the virtual table goes in the right
section.  That said, I don't know whether gcc actually does put the
virtual table in the right section.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux