This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ppc64 __attribute__((visibility ("hidden"))) and multiple TOCs
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Alan Modra <amodra at bigpond dot net dot au>, gcc at gcc dot gnu dot org, binutils at sources dot redhat dot com
- Date: Mon, 25 Jun 2007 08:54:05 -0400
- Subject: Re: ppc64 __attribute__((visibility ("hidden"))) and multiple TOCs
- References: <20070625110601.GQ7012@devserv.devel.redhat.com>
Jakub Jelinek wrote:
> Hi!
>
> extern void bar (void) __attribute__((visibility ("hidden")));
> void foo (void)
> {
> bar ();
> bar ();
> }
> compiled on ppc64-linux with -O2 -m64 -mminimal-toc
> leads to bl bar without nop in the following instruction
> and to sibling call.
> Shouldn't -mminimal-toc also forbid omitting nops if
> the target call isn't defined in the same file and forbid
> sibcalls to such functions?
That would be my recommendation: limit optimizations that require a
short branch to calls to functions in the same translation unit, not
just in the same shared object. But, that's just my two cents; the
Power maintainers might have a different take.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713