Did some renaming and cleanup: Renamed EXPR_SEGMENT to EXPR_SECTION, since
this is what it really is. Added a real EXPR_SECTION which is now used in the linker to represent the run address of a segment, provided that it is requested to be defined. Changed some named in use of EXPR_MEMAREA. Added handling of the new EXPR_SEGMENT to both, the binary and o65 output format. git-svn-id: svn://svn.cc65.org/cc65/trunk@1769 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -364,14 +364,14 @@ Export* CreateConstExport (const char* Name, long Value)
|
||||
|
||||
|
||||
|
||||
Export* CreateMemExport (const char* Name, Memory* Mem, unsigned long Offs)
|
||||
Export* CreateMemoryExport (const char* Name, Memory* Mem, unsigned long Offs)
|
||||
/* Create an relative export for a memory area offset */
|
||||
{
|
||||
/* Create a new export */
|
||||
Export* E = NewExport (EXP_ABS | EXP_EXPR | EXP_LABEL, Name, 0);
|
||||
|
||||
/* Assign the value */
|
||||
E->Expr = MemExpr (Mem, Offs, 0);
|
||||
E->Expr = MemoryExpr (Mem, Offs, 0);
|
||||
|
||||
/* Insert the export */
|
||||
InsertExport (E);
|
||||
@@ -382,14 +382,32 @@ Export* CreateMemExport (const char* Name, Memory* Mem, unsigned long Offs)
|
||||
|
||||
|
||||
|
||||
Export* CreateSegExport (const char* Name, Section* Sec, unsigned long Offs)
|
||||
/* Create a relative export to a segment (section) */
|
||||
Export* CreateSegmentExport (const char* Name, Segment* Seg, unsigned long Offs)
|
||||
/* Create a relative export to a segment */
|
||||
{
|
||||
/* Create a new export */
|
||||
Export* E = NewExport (EXP_ABS | EXP_EXPR | EXP_LABEL, Name, 0);
|
||||
|
||||
/* Assign the value */
|
||||
E->Expr = SegExpr (Sec, Offs, 0);
|
||||
E->Expr = SegmentExpr (Seg, Offs, 0);
|
||||
|
||||
/* Insert the export */
|
||||
InsertExport (E);
|
||||
|
||||
/* Return the new export */
|
||||
return E;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Export* CreateSectionExport (const char* Name, Section* Sec, unsigned long Offs)
|
||||
/* Create a relative export to a section */
|
||||
{
|
||||
/* Create a new export */
|
||||
Export* E = NewExport (EXP_ABS | EXP_EXPR | EXP_LABEL, Name, 0);
|
||||
|
||||
/* Assign the value */
|
||||
E->Expr = SectionExpr (Sec, Offs, 0);
|
||||
|
||||
/* Insert the export */
|
||||
InsertExport (E);
|
||||
|
||||
Reference in New Issue
Block a user