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


David Edelsohn wrote:
>>>>>> Mark Mitchell writes:
> 
> Mark> Good point -- if there's no definition in the current translation unit,
> Mark> then I guess we aren't going to make any bad assumptions about the
> Mark> contents of the function.  So, I guess that just means that the Power
> Mark> back end needs to check for !DECL_EXTERNAL in addition to binds_local_p?
> 
> 	Are you suggesting that the rs6000 port should override the hook
> or just swap the order of the tests in the default hook?

I was suggesting leaving the hook alone, but modifying the test for the
 sibling call optimization in rs6000_function_ok_for_sibcall to:

  !DECL_EXTERNAL (decl) && binds_local_p (decl)

In other words, per Jakub's argument, consider binds_local_p to be
correct (even on Power), but just note in the back end that
binds_local_p isn't a sufficient test for being safe for a sibling call.

-- 
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]