From e45a422da3cbf66242e24104e62c230a5f25db41 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Wed, 14 Aug 2024 01:46:32 +0200 Subject: [PATCH] Clarify error message when a section lacks a type The previous commit has made this precision possible --- src/link/section.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/link/section.cpp b/src/link/section.cpp index c66a1d06..c73fe464 100644 --- a/src/link/section.cpp +++ b/src/link/section.cpp @@ -229,7 +229,9 @@ Section *sect_GetSection(std::string const &name) { static void doSanityChecks(Section §ion) { // Sanity check the section's type if (section.type < 0 || section.type >= SECTTYPE_INVALID) { - error(nullptr, 0, "Section \"%s\" has an invalid type", section.name.c_str()); + // This is trapped early in RGBDS objects (because then the format is not parseable), + // which leaves SDAS objects. + error(nullptr, 0, "Section \"%s\" has not been assigned a type by a linker script", section.name.c_str()); return; }