forcing C++ objects to an address (ABI issue B-7)

Mark Mitchell mark@codesourcery.com
Sun Apr 18 03:08:00 GMT 2004


Anthony Heading wrote:

>Hi,
>
>I asked this question to gcc-help, which seemed more appropriate,
>but was referred either to here or the binutils list.
>
>In http://www.codesourcery.com/cxx-abi/cxx-closed.html#B7, the question
>of how to support C++ objects in shared memory is resolved by requiring
>"to force the objects, Vtables, functions, etc. to the same addresses
>in the various processes involved."
>
>How could this be done with GCC (specifically on Linux or Solaris if
>that is relevant)?  Is it as simple as ensuring the executable text
>is in the same place?  Or is some of the vtable data initialized at
>runtime?
>
No vtable data is initialized at runtime.  It is all read-only 
constants.  (Some of it might be initialized by the dynamic linker, 
which is sort-of runtime.)

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com



More information about the Gcc mailing list