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]

Re: Error with vtable thunks in EGCS under Linux


In message <199902111919.LAA18433@kankakee.wrs.com> you write:
> > From: hjl@lucon.org (H.J. Lu)
> > Date: Thu, 11 Feb 1999 07:23:41 -0800 (PST)
> 
> > When I asked about the vtable-thunks bug when we switched to
> > vtable-thunks, I was told
> 
> > 2. Hardly anyone would see the bug. If they did, they could find a
> > work around.
> 
> > Maybe I was misled :-(. But it is too late now, we cannot go back.
> 
> :-(  Well, what is past, is past.  If someone wants to work on the
> porblem, I think there is an easy solution to fix it (no Jason, not
> the entire reorganization of the object layout).  The code exactly
> parallels the trampoline code, and one just comes up with the byte
> sequences to put on the stack, and then updated the stack vtable to
> point to the thunk tramps on the stack.
> 
> Most of the code is already in the compiler (the hardest of the code),
> the only part left is the part that allocates a dynamic thunk on the
> stack, puts the code into the stack, places the given dynamic offset
> into the right slot into the code, then update the pointer to the
> member to point to the dynamic thunk instead.  About 30 lines per port
> we are interested in solving the problem for, another 20 lines in
> expand_upcast_fixups, delete 8 lines in expand_indirect_vtbls_init,
> and about 100 more lines to do all the next trampoline style code.
> 
> I know the code very well, and would be happy to help someone what can
> grok complexity quickly and not be put off by working in code they
> don't understand.  Most of the code will be copying the style of
> existing code, so hopefully there won't be much `new' stuff to invent.
> A tree hacker would be better than an rtl hacker.
> 
> Let me know.

The reason I haven't stepped forward yet is that I'm not sure when
I'll get the time.  I *could* do it, but probably wouldn't be able to
start until after the Feb. 21 (I have company coming in for the next
week).  I'd certainly be willing to help out if someone else wants to
step forward and in the mean time, if there is some documentation out
there describing exactly what a 'dynamic vtable thunk' is and does,
I'd love to see it so I can see what needs to be done.

I do grok complexity quickly and am familiar with the tree code
(although most of my hacking in the past has been in the backend), so I
have a decent starting point.  I will definitely need some handholding
from Mike though (when I have time to get to it).

-------------------------------------------------------------------------------
Lee Iverson     		SRI International
leei@ai.sri.com			333 Ravenswood Ave., Menlo Park CA 94025
http://www.ai.sri.com/~leei/	(650) 859-3307



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