Hello to everybody!
I will provide some info about sjlj and I can also give some arguments supporting the idea that gcc sjlj variants should be released.
The sjlj functionality is specified in the C standard from C90 upwards.
sjlj is described by the standard as a functionality to make jumps in the code from one function to the other (goto can do jumps only in the current function).
Also if somebody works only with C code dwarf exception handling is probably useless, because as I know only C++ code can use dwarf exceptions. In fact the C programming language does not even has the idea of exception handling. SJLJ is implemented in the C standard as a method to jump in the code, to do "long jumps", but not as an exception handling mechanism. It is true that using the sjlj functionality, an exception handling mechanism can be implemented, so an exception handling emulation can be done with C code.
Also if you work with pure C code dwarf is a waste of space and code execution.
Compiled C code with a dwarf enabled compiler inserts extra sections in the code + does extra function calls.
So the code size will increase and there is no gcc option to completely exclude dwarf sections and code from the final binary.
The gcc dwarf compiler inserts 4 functions in you code from which one it is even called despite you don't use exception handling in your program. This extra function call is GetModuleHandleA() which is called every time in a dwarf enabled program before the main function is called.
So my opinion and conclusion is that gcc variants with sjlj should be released for newer gcc compilers also (e.g. 10.1.0) because if somebody writes code only in the C language the sjlj variant is preferred over dwarf which, remember adds no benefits to C code.
Hello to everybody!
I will provide some info about sjlj and I can also give some arguments supporting the idea that gcc sjlj variants should be released.
The sjlj functionality is specified in the C standard from C90 upwards.
sjlj is described by the standard as a functionality to make jumps in the code from one function to the other (goto can do jumps only in the current function).
Also if somebody works only with C code dwarf exception handling is probably useless, because as I know only C++ code can use dwarf exceptions. In fact the C programming language does not even has the idea of exception handling. SJLJ is implemented in the C standard as a method to jump in the code, to do "long jumps", but not as an exception handling mechanism. It is true that using the sjlj functionality, an exception handling mechanism can be implemented, so an exception handling emulation can be done with C code.
Also if you work with pure C code dwarf is a waste of space and code execution.
Compiled C code with a dwarf enabled compiler inserts extra sections in the code + does extra function calls.
So the code size will increase and there is no gcc option to completely exclude dwarf sections and code from the final binary.
The gcc dwarf compiler inserts 4 functions in you code from which one it is even called despite you don't use exception handling in your program. This extra function call is GetModuleHandleA() which is called every time in a dwarf enabled program before the main function is called.
So my opinion and conclusion is that gcc variants with sjlj should be released for newer gcc compilers also (e.g. 10.1.0) because if somebody writes code only in the C language the sjlj variant is preferred over dwarf which, remember adds no benefits to C code.