From 017bdf970a0681b1c76cbe29ee075089a791e94d Mon Sep 17 00:00:00 2001 From: uz Date: Tue, 17 Aug 2010 20:54:02 +0000 Subject: [PATCH] Include information about the type of the symbol in the flags written to the object file. git-svn-id: svn://svn.cc65.org/cc65/trunk@4813 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/symentry.c | 1 + src/common/symdefs.h | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ca65/symentry.c b/src/ca65/symentry.c index b957c0a67..3df040d28 100644 --- a/src/ca65/symentry.c +++ b/src/ca65/symentry.c @@ -685,6 +685,7 @@ unsigned GetSymInfoFlags (const SymEntry* S, long* ConstVal) unsigned Flags = 0; Flags |= SymIsConst (S, ConstVal)? SYM_CONST : SYM_EXPR; Flags |= (S->Flags & SF_LABEL)? SYM_LABEL : SYM_EQUATE; + Flags |= (S->Flags & SF_LOCAL)? SYM_CHEAP_LOCAL : SYM_STD; /* Return the result */ return Flags; diff --git a/src/common/symdefs.h b/src/common/symdefs.h index 6ffb4515e..3b9018a6e 100644 --- a/src/common/symdefs.h +++ b/src/common/symdefs.h @@ -71,11 +71,19 @@ #define SYM_IS_EQUATE(x) (((x) & SYM_MASK_LABEL) == SYM_EQUATE) #define SYM_IS_LABEL(x) (((x) & SYM_MASK_LABEL) == SYM_LABEL) +/* Symbol type */ +#define SYM_STD 0x00U /* Standard symbol */ +#define SYM_CHEAP_LOCAL 0x40U /* Cheap local symbol */ +#define SYM_MASK_TYPE 0x40U /* Value mask */ + +#define SYM_IS_STD(x) (((x) & SYM_MASK_TYPE) == SYM_STD) +#define SYM_IS_CHEAP_LOCAL (((x) & SYM_MASK_TYPE) == SYM_CHEAP_LOCAL) + /* End of symdefs.h */ #endif - + -- 2.39.5