tcc_error_noabort(): always use this unless compiling

This avoids 'exit(1)' with errors outside of compilation
(nasty in particular with libtcc usage)

As a sideeffect multiple errors can be seen for linker
errors (such as undefined symbols, relocation errors, ...)
This commit is contained in:
grischka
2023-04-15 09:54:23 +02:00
parent 19ef024aa9
commit 7916cf71cc
17 changed files with 190 additions and 181 deletions

View File

@@ -227,7 +227,7 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t
case R_386_16:
if (s1->output_format != TCC_OUTPUT_FORMAT_BINARY) {
output_file:
tcc_error("can only produce 16-bit binary files");
tcc_error_noabort("can only produce 16-bit binary files");
}
write16le(ptr, read16le(ptr) + val);
return;
@@ -274,7 +274,7 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t
add32le(ptr + 5, -x);
}
else
tcc_error("unexpected R_386_TLS_GD pattern");
tcc_error_noabort("unexpected R_386_TLS_GD pattern");
}
return;
case R_386_TLS_LDM:
@@ -297,7 +297,7 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t
rel[1].r_info = ELFW(R_INFO)(0, R_386_NONE);
}
else
tcc_error("unexpected R_386_TLS_LDM pattern");
tcc_error_noabort("unexpected R_386_TLS_LDM pattern");
}
return;
case R_386_TLS_LDO_32: