Add support for including files in linkerscript

Files can now be included with the following syntax:

    INCLUDE "path.link"

The maximum include depth is 5.

Fixed linkerscript parser and lexer error messages so that they are more
informative (show file and line of the error).

Man page updated.

Signed-off-by: Antonio Niño Díaz <[email protected]>
This commit is contained in:
Antonio Niño Díaz committed 2017-04-08 18:10:24 +01:00
1 parent 3d8396b86f
commit 206275df57
5 files changed
+156 -46

No files matched your search

+8
View File
@@ -17,8 +17,16 @@
#ifndef RGBDS_LINK_SCRIPT_H
#define RGBDS_LINK_SCRIPT_H
#include "extern/stdnoreturn.h"
noreturn void script_fatalerror(const char *fmt, ...);
void script_Parse(const char *path);
void script_IncludeFile(const char *path);
int script_IncludeDepthGet(void);
void script_IncludePop(void);
void script_InitSections(void);
void script_SetCurrentSectionType(const char *type, unsigned int bank);
void script_SetAddress(unsigned int addr);