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: Andreas Jaeger <aj at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, jason at redhat dot com,gcc-patches at gcc dot gnu dot org
- Date: Sun, 13 Jul 2003 20:15:22 +0200
- Subject: Re: [PATCH] Make calls in virtual thunks local if possible
- References: <20030623152017.GA20507@sunsite.ms.mff.cuni.cz>
Jakub Jelinek <jakub@redhat.com> writes:
> Hi!
>
> 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?
Btw. I noticed there's no test case for this - is it possible to
come up with something?
Andreas
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126