Separate processing the linker config file into two phases: The config file is
read when the -t or -C switch is encountered and parts of it are processed. The remaining parts are processed when all object files and libraries have been read. To make this work, the expression evaluation in cfgexpr has been rewritten to generate true expression trees. This means that expressions in the linker config may use exports from the object files. Separation of config file processing is the base for several enhancements, for example forced imports by linker config. This code needs more work and is only very, very, very roughly tested. git-svn-id: svn://svn.cc65.org/cc65/trunk@4840 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -110,8 +110,8 @@ struct ExprNode {
|
||||
long IVal; /* If this is a int value */
|
||||
struct SymEntry* Sym; /* If this is a symbol */
|
||||
unsigned SegNum; /* If this is a segment */
|
||||
unsigned ImpNum; /* If this is an import */
|
||||
struct Memory* Mem; /* If this is a memory area */
|
||||
struct Import* Imp; /* If this is an import */
|
||||
struct MemoryArea* Mem; /* If this is a memory area */
|
||||
struct Segment* Seg; /* If this is a segment */
|
||||
struct Section* Sec; /* If section and Obj is NULL */
|
||||
} V;
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 1998-2003 Ullrich von Bassewitz */
|
||||
/* R<EFBFBD>merstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* (C) 1998-2010, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
@@ -39,14 +39,14 @@
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* Defines for magic and version */
|
||||
#define LIB_MAGIC 0x7A55616E
|
||||
#define LIB_VERSION 0x000B
|
||||
#define LIB_VERSION 0x000C
|
||||
|
||||
/* Size of an library file header */
|
||||
#define LIB_HDR_SIZE 12
|
||||
|
||||
Reference in New Issue
Block a user