Blackfin patch: fix sibcalls & ID shared libraries interaction

Bernd Schmidt bernds_cb1@t-online.de
Tue Nov 21 13:05:00 GMT 2006


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



More information about the Gcc-patches mailing list