This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Make calls in virtual thunks local if possible
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: Richard Henderson <rth at redhat dot com>, jason at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 14 Jul 2003 05:09:55 -0400
- Subject: Re: [PATCH] Make calls in virtual thunks local if possible
- References: <20030623152017.GA20507@sunsite.ms.mff.cuni.cz> <u83cha8f9h.fsf@gromit.moeb>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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