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: Blackfin patch: fix sibcalls & ID shared libraries interaction


Graham Stott wrote:
> Hi Bernd,
> 
> A function can be local to a filw (i.e. static) and it's address can
> still escape the file and hence the local function can be called by code
> external to the file.  Such code could be external to the shared library
> in which case the pic register won't contain the correct value on entry
> to the local function.
> 
> Am I missing something?
> 
> Does 4.x have the necessary escape analysis to determine if the address
> of a local function escapes the file?

Yes.  See the comment near the "local" member in cgraph.h:

  /* Set when function function is visible in current compilation unit only
     and its address is never taken.  */
  unsigned local : 1;


Bernd


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