This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Using the PLT for vtables (or not)
- From: Brian Ryner <bryner at brianryner dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 04 Dec 2003 17:50:28 -0800
- Subject: 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