1 /*
2  * This file is part of RGBDS.
3  *
4  * Copyright (c) 1997-2019, Carsten Sorensen and RGBDS contributors.
5  *
6  * SPDX-License-Identifier: MIT
7  */
8 
9 /* Parsing a linker script */
10 #ifndef RGBDS_LINK_SCRIPT_H
11 #define RGBDS_LINK_SCRIPT_H
12 
13 #include <stdint.h>
14 
15 extern FILE * linkerScript;
16 
17 struct SectionPlacement {
18 	struct Section *section;
19 	uint16_t org;
20 	uint32_t bank;
21 };
22 
23 extern uint64_t script_lineNo;
24 
25 /**
26  * Parses the linker script to return the next section constraint
27  * @return A pointer to a struct, or NULL on EOF. The pointer shouldn't be freed
28  */
29 struct SectionPlacement *script_NextSection(void);
30 
31 /**
32  * `free`s all assignment memory that was allocated.
33  */
34 void script_Cleanup(void);
35 
36 #endif /* RGBDS_LINK_SCRIPT_H */
37