This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Using the PLT for vtables (or not)


Hi all,

On ELF, the vtable contains pointers to PLT entries. I was wondering if anyone could comment on the reasons for constructing the vtable this way. In particular, it seems like you could make virtual method calls more efficient (by avoiding a load and jump) if you put the vtable into writable memory, and initialized it with the real address of every method the first time an instance of a class is created.

Any thoughts?

--
-Brian Ryner
bryner@brianryner.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]