libgcc problems
David Edelsohn
dje@watson.ibm.com
Fri Jan 16 20:09:00 GMT 1998
>>>>> Andrey Slepuhin writes:
Andrey> I agree that it is better to have local copies of __sjthrow() and
Andrey> other exception handling functions - this avoid overhead with
Andrey> glink code. But __terminate_func is rare used and can go to
Andrey> shared library. More difficult to decide what to do with
Andrey> top_elt and get_eh_context, which are static variables and *must*
Andrey> have only one instance. I didn't looked if there is any overhead
Andrey> accessing non-local variables (as with non-local functions). If no,
Andrey> they also can be shared.
The overhead for shared variables is the linker and loader need to
arrange to resolve them in each TOC used to access them. Shared variables
are accessed via the TOC and the loader fills in their address. Because
of the clumsy way that static variable currently are handled by GCC,
shared variables actually are better and use up less TOC entries.
Andrey> Interesting, is there some code reserved for exception handling
Andrey> in AIX libc (or all C++ specific code is in xlC's libC), and if yes,
Andrey> can this code be used for gcc's purposes. E.g. if libc already
Andrey> containes pointer to terminate handler, we can use it instead
Andrey> of __terminate_func.
Andrey> David, do you have any references to mentioned PowerOpen ABI?
Andrey> This is very interesting in any case...
libC.a handles exception handling, but I am not sure whether it
could be used to supply GCC's stack walking functionality. The traceback
table already is documented in the GCC output_epilog routine for the
rs6000 port and /usr/include/sys/debug.h.
David
More information about the Gcc
mailing list