mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-28 13:57:48 +00:00
Add section fragments
Fixes #517, and hopefully enables RGBDS as a SDCC back-end
This commit is contained in:
@@ -19,7 +19,7 @@ struct Expression;
|
||||
struct Section {
|
||||
char *pzName;
|
||||
enum SectionType nType;
|
||||
bool isUnion;
|
||||
enum SectionModifier modifier;
|
||||
uint32_t size;
|
||||
uint32_t nOrg;
|
||||
uint32_t nBank;
|
||||
@@ -38,7 +38,8 @@ struct SectionSpec {
|
||||
|
||||
struct Section *out_FindSectionByName(const char *pzName);
|
||||
void out_NewSection(char const *pzName, uint32_t secttype, uint32_t org,
|
||||
struct SectionSpec const *attributes, bool isUnion);
|
||||
struct SectionSpec const *attributes,
|
||||
enum SectionModifier mod);
|
||||
void out_SetLoadSection(char const *name, uint32_t secttype, uint32_t org,
|
||||
struct SectionSpec const *attributes);
|
||||
void out_EndLoadSection(void);
|
||||
|
||||
@@ -42,8 +42,9 @@ struct Section {
|
||||
/* Info contained in the object files */
|
||||
char *name;
|
||||
uint16_t size;
|
||||
uint16_t offset;
|
||||
enum SectionType type;
|
||||
bool isUnion;
|
||||
enum SectionModifier modifier;
|
||||
bool isAddressFixed;
|
||||
uint16_t org;
|
||||
bool isBankFixed;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#define RGBDS_OBJECT_VERSION_STRING "RGB%1u"
|
||||
#define RGBDS_OBJECT_VERSION_NUMBER 9U
|
||||
#define RGBDS_OBJECT_REV 4U
|
||||
#define RGBDS_OBJECT_REV 5U
|
||||
|
||||
enum AssertionType {
|
||||
ASSERT_WARN,
|
||||
@@ -73,6 +73,14 @@ enum SectionType {
|
||||
SECTTYPE_INVALID
|
||||
};
|
||||
|
||||
enum SectionModifier {
|
||||
SECTION_NORMAL,
|
||||
SECTION_UNION,
|
||||
SECTION_FRAGMENT
|
||||
};
|
||||
|
||||
extern char const * const sectionModNames[];
|
||||
|
||||
/**
|
||||
* Tells whether a section has data in its object file definition,
|
||||
* depending on type.
|
||||
|
||||
Reference in New Issue
Block a user