Reinstate PUSHS clearing the SECTION scope (#870)

* Reinstate PUSHS clearing the SECTION scope

Otherwise you can use `PUSHS` to simulate the old `ds -21`, and possibly cause bugs

* Have PUSHS push LOAD block state as well

It does not make sense not to, and coud cause bugs.
This commit is contained in:
Eldred Habert
2021-05-01 23:30:09 +02:00
committed by GitHub
parent 3ffdd50909
commit 21b59c4651
9 changed files with 26 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ struct Expression;
struct FileStackNode;
extern char *objectName;
extern struct Section *sectionList, *currentSection;
extern struct Section *sectionList;
void out_RegisterNode(struct FileStackNode *node);
void out_ReplaceNode(struct FileStackNode *node);

View File

@@ -40,6 +40,8 @@ struct SectionSpec {
uint16_t alignOfs;
};
extern struct Section *currentSection;
struct Section *out_FindSectionByName(const char *name);
void out_NewSection(char const *name, uint32_t secttype, uint32_t org,
struct SectionSpec const *attributes,