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:
@@ -103,6 +103,7 @@ static Segment* NewSegment (unsigned Name, unsigned char AddrSize)
|
||||
S->AddrSize = AddrSize;
|
||||
S->ReadOnly = 0;
|
||||
S->Relocatable = 0;
|
||||
S->Placed = 0;
|
||||
S->Dumped = 0;
|
||||
|
||||
/* Insert the segment into the segment list and assign the segment id */
|
||||
@@ -487,7 +488,7 @@ void SegWrite (const char* TgtName, FILE* Tgt, Segment* S, SegWriteFunc F, void*
|
||||
/* Write the data from the given segment to a file. For expressions, F is
|
||||
* called (see description of SegWriteFunc above).
|
||||
*/
|
||||
{
|
||||
{
|
||||
Section* Sec;
|
||||
int Sign;
|
||||
unsigned long Offs = 0;
|
||||
|
||||
Reference in New Issue
Block a user