mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 19:22:05 +00:00
Cleanup code of rbglink
Follow Linux kernel coding style. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -27,8 +27,10 @@ enum eBankDefine {
|
||||
BANK_SRAM = BANK_HRAM + BANK_COUNT_HRAM
|
||||
};
|
||||
|
||||
#define MAXBANKS (BANK_COUNT_ROM0 + BANK_COUNT_ROMX + BANK_COUNT_WRAM0 + BANK_COUNT_WRAMX \
|
||||
+ BANK_COUNT_VRAM + BANK_COUNT_OAM + BANK_COUNT_HRAM + BANK_COUNT_SRAM)
|
||||
#define MAXBANKS (BANK_COUNT_ROM0 + BANK_COUNT_ROMX \
|
||||
+ BANK_COUNT_WRAM0 + BANK_COUNT_WRAMX \
|
||||
+ BANK_COUNT_VRAM + BANK_COUNT_OAM \
|
||||
+ BANK_COUNT_HRAM + BANK_COUNT_SRAM)
|
||||
|
||||
extern int32_t MaxBankUsed;
|
||||
extern int32_t MaxAvail[MAXBANKS];
|
||||
@@ -36,17 +38,11 @@ extern int32_t MaxAvail[MAXBANKS];
|
||||
int32_t area_Avail(int32_t bank);
|
||||
void AssignSections(void);
|
||||
void CreateSymbolTable(void);
|
||||
int32_t IsSectionNameInUse(const char *name);
|
||||
void SetLinkerscriptName(char *tzLinkerscriptFile);
|
||||
int32_t IsSectionSameTypeBankAndFloating(const char *name,
|
||||
enum eSectionType type, int32_t bank);
|
||||
uint32_t AssignSectionAddressAndBankByName(const char *name, uint32_t address,
|
||||
int32_t bank);
|
||||
|
||||
int32_t
|
||||
IsSectionNameInUse(const char *name);
|
||||
|
||||
void
|
||||
SetLinkerscriptName(char *tzLinkerscriptFile);
|
||||
|
||||
int32_t
|
||||
IsSectionSameTypeBankAndFloating(const char *name, enum eSectionType type, int32_t bank);
|
||||
|
||||
uint32_t
|
||||
AssignSectionAddressAndBankByName(const char *name, uint32_t address, int32_t bank);
|
||||
|
||||
#endif
|
||||
#endif /* RGBDS_LINK_ASSIGN_H */
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
void AddNeededModules(void);
|
||||
|
||||
#endif
|
||||
#endif /* RGBDS_LINK_LIBRARY_H */
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
extern int32_t fillchar;
|
||||
extern char *smartlinkstartsymbol;
|
||||
|
||||
#endif
|
||||
#endif /* RGBDS_LINK_MAIN_H */
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
void SetMapfileName(char *name);
|
||||
void SetSymfileName(char *name);
|
||||
void CloseMapfile(void);
|
||||
void MapfileWriteSection(struct sSection * pSect);
|
||||
void MapfileWriteSection(const struct sSection *pSect);
|
||||
void MapfileInitBank(int32_t bank);
|
||||
void MapfileCloseBank(int32_t slack);
|
||||
|
||||
#endif
|
||||
#endif /* RGBDS_LINK_MAPFILE_H */
|
||||
|
||||
@@ -82,10 +82,12 @@ enum eSymbolType {
|
||||
struct sSymbol {
|
||||
char *pzName;
|
||||
enum eSymbolType Type;
|
||||
/* the following 3 items only valid when Type!=SYM_IMPORT */
|
||||
int32_t nSectionID; /* internal to object.c */
|
||||
|
||||
/* The following 3 items only valid when Type!=SYM_IMPORT */
|
||||
int32_t nSectionID; /* Internal to object.c */
|
||||
struct sSection *pSection;
|
||||
int32_t nOffset;
|
||||
|
||||
char *pzObjFileName; /* Object file where the symbol is located. */
|
||||
char *pzFileName; /* Source file where the symbol was defined. */
|
||||
uint32_t nFileLine; /* Line where the symbol was defined. */
|
||||
@@ -111,4 +113,4 @@ struct sPatch {
|
||||
extern struct sSection *pSections;
|
||||
extern struct sSection *pLibSections;
|
||||
|
||||
#endif
|
||||
#endif /* RGBDS_LINK_LINK_H */
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
void obj_Readfile(char *tzObjectfile);
|
||||
|
||||
#endif
|
||||
#endif /* RGBDS_LINK_OBJECT_H */
|
||||
|
||||
@@ -5,4 +5,4 @@ void out_Setname(char *tzOutputfile);
|
||||
void out_SetOverlayname(char *tzOverlayfile);
|
||||
void Output(void);
|
||||
|
||||
#endif
|
||||
#endif /* RGBDS_LINK_OUTPUT_H */
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
void Patch(void);
|
||||
extern int32_t nPC;
|
||||
|
||||
#endif
|
||||
#endif /* RGBDS_LINK_PATCH_H */
|
||||
|
||||
@@ -35,5 +35,4 @@ void script_SetAddress(uint32_t addr);
|
||||
void script_SetAlignment(uint32_t alignment);
|
||||
void script_OutputSection(const char *section_name);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* RGBDS_LINK_SCRIPT_H */
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
void sym_Init(void);
|
||||
void sym_CreateSymbol(char *tzName, int32_t nValue, int32_t nBank,
|
||||
char *tzObjFileName, char *tzFileName, uint32_t nFileLine);
|
||||
char *tzObjFileName, char *tzFileName,
|
||||
uint32_t nFileLine);
|
||||
int32_t sym_GetValue(char *tzName);
|
||||
int32_t sym_GetBank(char *tzName);
|
||||
|
||||
#endif
|
||||
#endif /* RGBDS_LINK_SYMBOL_H */
|
||||
|
||||
Reference in New Issue
Block a user