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


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


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