Remove local label error checking

This is actually not necessary, because RGBLINK would warn about missing labels.
Besides, through semi-esoteric ways, it is possible to define more labels in this scope,
and there's no reason to prevent that.
This commit is contained in:
ISSOtm
2020-01-22 10:44:44 +01:00
parent ab4ca9ad8c
commit e3ef194b4f
4 changed files with 0 additions and 31 deletions

View File

@@ -40,7 +40,6 @@ void out_AbsByteGroup(char *s, int32_t length);
void out_RelByte(struct Expression *expr);
void out_RelWord(struct Expression *expr);
void out_PCRelByte(struct Expression *expr);
void out_CheckErrors(void);
void out_WriteObject(void);
void out_Skip(int32_t skip);
void out_BinaryFile(char *s);

View File

@@ -471,7 +471,6 @@ int main(int argc, char *argv[])
(int)(60 / timespent * nTotalLines));
}
out_CheckErrors();
/* If no path specified, don't write file */
if (tzObjectname != NULL)
out_WriteObject();

View File

@@ -526,34 +526,6 @@ static void checksectionoverflow(uint32_t delta_size)
}
}
/*
* Check for errors that could happen while writing an object file
* This is important as out_WriteObject is skipped entirely when `-o` is omitted
* Therefore, errors such as memory allocations still should be handled in
* out_WriteObject and not here
*/
void out_CheckErrors(void)
{
/* Local symbols cannot be imported from elsewhere */
struct PatchSymbol *pSym = pPatchSymbols;
while (pSym) {
struct sSymbol const *pSymbol = pSym->pSymbol;
if (!(pSymbol->nType & SYMF_DEFINED)
&& pSymbol->nType & SYMF_LOCAL) {
char const *name = pSymbol->tzName;
char const *localPtr = strchr(name, '.');
if (localPtr)
name = localPtr;
errx(1, "%s(%u) : '%s' not defined",
pSymbol->tzFileName, pSymbol->nFileLine, name);
}
pSym = pSym->pNext;
}
}
/*
* Write an objectfile
*/

View File

@@ -1 +0,0 @@
error: undefined-dot.asm(3) : '.' not defined