This is the mail archive of the gcc@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: SYMBOL_REF_FLAG


Phil Blundell <pb@nexus.co.uk> writes:

> The ARM backend has some kind of support for referencing static globals
> in PIC code using (GOTOFF) relocs rather than (GOT).  In practice though
> this is never triggering because it lacks enough information to do
> anything useful.  Other backends seem to encode the knowledge of whether
> a SYMBOL_REF has global linkage using SYMBOL_REF_FLAG (ie rtx->volatil),
> but the arm backend is already using this for other purposes.
> 
> Are there any other flag bits in SYMBOL_REFs that could be safely
> pressed into service for this?

Generally when SYMBOL_REF_FLAG is already in use, the solution is to
prepend some character to symbol names, and use STRIP_NAME_ENCODING
etc. to remove it.  The rs6000 port uses '@' in this fashion, for
instance.

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>


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