mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Port linkerscript parser to Bison (#1266)
Notable side effects: * Use the standard-conformant MSVC preproc * Add test for linker script INCLUDE * Improve wording of placement conflict errors * Fix errors from not newline-terminated files * Teach checkdiff about the linker script doc * Call linker script "commands" "directives" instead --------- Co-authored-by: Rangi42 <remy.oukaour+rangi42@gmail.com>
This commit is contained in:
@@ -8,26 +8,9 @@
|
||||
|
||||
#include "linkdefs.hpp"
|
||||
|
||||
extern FILE * linkerScript;
|
||||
|
||||
struct SectionPlacement {
|
||||
struct Section *section;
|
||||
enum SectionType type;
|
||||
uint16_t org;
|
||||
uint32_t bank;
|
||||
};
|
||||
|
||||
extern uint64_t script_lineNo;
|
||||
|
||||
/*
|
||||
* Parses the linker script to return the next section constraint
|
||||
* @return A pointer to a struct, or NULL on EOF. The pointer shouldn't be freed
|
||||
* Parses the linker script, and modifies the sections mentioned within appropriately.
|
||||
*/
|
||||
struct SectionPlacement *script_NextSection(void);
|
||||
|
||||
/*
|
||||
* `free`s all assignment memory that was allocated.
|
||||
*/
|
||||
void script_Cleanup(void);
|
||||
void script_ProcessScript(char const *path);
|
||||
|
||||
#endif // RGBDS_LINK_SCRIPT_H
|
||||
|
||||
Reference in New Issue
Block a user