Split up the linkerscript lexer and layout actions

This commit is contained in:
Rangi42
2025-07-27 13:03:28 -04:00
parent a353637a90
commit 16e16cdf51
15 changed files with 448 additions and 433 deletions

View File

@@ -103,7 +103,7 @@ void errorNoDump(char const *fmt, ...) {
warnings.incrementErrors();
}
void argErr(char flag, char const *fmt, ...) {
void argError(char flag, char const *fmt, ...) {
va_list args;
fprintf(stderr, "error: Invalid argument for option '%c': ", flag);
va_start(args, fmt);
@@ -114,6 +114,14 @@ void argErr(char flag, char const *fmt, ...) {
warnings.incrementErrors();
}
void scriptError(char const *name, uint32_t lineNo, char const *fmt, va_list args) {
fprintf(stderr, "error: %s(%" PRIu32 "): ", name, lineNo);
vfprintf(stderr, fmt, args);
putc('\n', stderr);
warnings.incrementErrors();
}
[[noreturn]]
void fatal(FileStackNode const *src, uint32_t lineNo, char const *fmt, ...) {
va_list args;