This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Blackfin patch: fix sibcalls & ID shared libraries interaction
- From: Bernd Schmidt <bernds_cb1 at t-online dot de>
- To: Graham Stott <graham dot stott at btinternet dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 21 Nov 2006 14:04:50 +0100
- Subject: Re: Blackfin patch: fix sibcalls & ID shared libraries interaction
- References: <4561A284.5080907@t-online.de> <4562432E.3020303@btinternet.com>
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