This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: ppc64 __attribute__((visibility ("hidden"))) and multiple TOCs


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


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