Install the user trap handlers that libc provides from a constructor, so

that they will be installed before application constructors are invoked.
Its possible to link applications such that this fails, application code
is invoked before they are installed, but, well, Don't Do That.

Approved by:	re (jhb)
This commit is contained in:
Jake Burkholder 2003-11-18 14:21:41 +00:00
parent 7e1985fcd8
commit eaf21f315e

View file

@ -48,6 +48,8 @@ static const struct sparc_utrap_install_args uia[] = {
sizeof (ua) / sizeof (*ua), ua
};
void __sparc_utrap_setup(void) __attribute__((constructor));
void
__sparc_utrap_setup(void)
{