Fixed a problem with .global: In some situations, exported symbols went

into the object files with an address size of ADDR_SIZE_DEFAULT, something
which cannot be handled by the linker.


git-svn-id: svn://svn.cc65.org/cc65/trunk@2980 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2004-04-19 17:00:12 +00:00
parent 2b57b0e4f4
commit 0eba6f615f
3 changed files with 62 additions and 6 deletions

View File

@@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 1998-2003 Ullrich von Bassewitz */
/* (C) 1998-2004 Ullrich von Bassewitz */
/* R<>merstra<72>e 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@@ -165,6 +165,16 @@ void SymConDes (SymEntry* Sym, unsigned char AddrSize, unsigned Type, unsigned P
* mark the symbol as an export. Initializers may never be zero page symbols.
*/
void SymExportFromGlobal (SymEntry* S);
/* Called at the end of assembly. Converts a global symbol that is defined
* into an export.
*/
void SymImportFromGlobal (SymEntry* S);
/* Called at the end of assembly. Converts a global symbol that is undefined
* into an import.
*/
#if defined(HAVE_INLINE)
INLINE int SymIsDef (const SymEntry* S)
/* Return true if the given symbol is already defined */
@@ -196,6 +206,17 @@ INLINE int SymIsImport (const SymEntry* S)
# define SymIsImport(S) (((S)->Flags & SF_IMPORT) != 0)
#endif
#if defined(HAVE_INLINE)
INLINE int SymIsExport (const SymEntry* S)
/* Return true if the given symbol is marked as export */
{
/* Check the export flag */
return (S->Flags & SF_EXPORT) != 0;
}
#else
# define SymIsExport(S) (((S)->Flags & SF_EXPORT) != 0)
#endif
int SymIsConst (SymEntry* Sym, long* Val);
/* Return true if the given symbol has a constant value. If Val is not NULL
* and the symbol has a constant value, store it's value there.