mirror of
https://github.com/mirror/tinycc.git
synced 2026-08-18 11:03:27 +08:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user