This is the mail archive of the gcc-patches@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]

Re: [PATCH] Make calls in virtual thunks local if possible


On Sun, Jul 13, 2003 at 08:15:22PM +0200, Andreas Jaeger wrote:
> > If ASM_OUTPUT_DEF is supported, this patch creates a static alias to methods
> > which need thunks and makes thunks call these static aliases instead of the
> > real method symbols. This is possible since thunks are always emitted
> > together with the methods they are calling.
> > If a method is emitted in a linkonce section, it will emit the thunk into
> > the same linkonce section as well, since local symbols in linkonce sections
> > cannot be safely accessed from other sections.
> 
> What effect does this have on the generated code?  Is this correctness
> or effiency?  Are we generating now a call to local function instead
> to a global one?

The s390* changes were correctness issue, the rest
efficiency which was spotted when looking into the s390 problem.

> Btw. I noticed there's no test case for this - is it possible to
> come up with something?

For s390*, one could be added, but it would be pretty hard to do in gcc.dg
- it involves some code in shared libraries and some code in the
main binary.

	Jakub


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