This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: External or local SYMBOL_REF?
- To: lars brinkhoff <lars at nocrew dot org>
- Subject: Re: External or local SYMBOL_REF?
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Mon, 18 Sep 2000 14:05:38 +0100 (BST)
- CC: gcc at gcc dot gnu dot org
> If I have an rtx x for which GET_CODE (x) == SYMBOL_REF, how do I
> find out whether the symbol is external or local?
>
> E.g.
>
> extern int a; // external
> static int b; // local
> int c; // local
There no such information in the rtl in general.
You can arrange for the inforamation to be extracted from the tree and
encoded in the name of the symbol by defining ENCODE_SECTION_INFO.