__register_frame () change in 1997-12-07 egcs

meissner@cygnus.com meissner@cygnus.com
Mon Dec 8 15:15:00 GMT 1997


|   In message < m0xfAgm-0004ecC@ocean.lucon.org >you write:
|   > Hi,
|   > 
|   > __register_frame () change in 1997-12-07 egcs causes many problems.
|   > Since __register_frame () called in crtbegin.o is in libgcc2.c and
|   > gcc -shared includes crtbegin.o and -lgcc, any libc.so built by
|   > previous egcs has __register_frame () in libc.so. Now the ABI for
|   > __register_frame () is changed, that is a big mess for Linux since
|   > shared libraries are used a lot. When the ABI of a function in
|   > shared library is changed like this, it doesn't work too well.
|   > It should be fixed ASAP.
| Well, then we've got a problem.  We're open to suggestions for how to
| fix it.

You might fall back on the old scheme of using common variable that is
initialized to the address of the __register_frame function inside frame.o.  If
nobody calls the frame functions, the variable is is 0.  For example, if
crtbegin.o contains:

	void (__fptr)();
		/* ... */
	static void
	init_dummy()
	{
		/* ... */
		if (__fptr)
			(*__fptr)();
	}

and frame.c adds:

	void (__fptr)() = __register_frame;

at the end (or after __register_frame decl).



More information about the Gcc mailing list