summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2003-11-18 14:21:41 +0000
committerjake <jake@FreeBSD.org>2003-11-18 14:21:41 +0000
commit3b85e0cc9c427c6abeaacdc482d16c6fa3d9f917 (patch)
tree9cf62b0d4213ab4b6288ba28e7c1df6869579c02
parent419b586baeea25eeb764f0249687be3253b2f93c (diff)
downloadFreeBSD-src-3b85e0cc9c427c6abeaacdc482d16c6fa3d9f917.zip
FreeBSD-src-3b85e0cc9c427c6abeaacdc482d16c6fa3d9f917.tar.gz
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)
-rw-r--r--lib/libc/sparc64/sys/__sparc_utrap_setup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/sparc64/sys/__sparc_utrap_setup.c b/lib/libc/sparc64/sys/__sparc_utrap_setup.c
index 1c8ce30..0f7a22d 100644
--- a/lib/libc/sparc64/sys/__sparc_utrap_setup.c
+++ b/lib/libc/sparc64/sys/__sparc_utrap_setup.c
@@ -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)
{
OpenPOWER on IntegriCloud