From 7879263397dd5f904770ec2446920dea4199e504 Mon Sep 17 00:00:00 2001 From: Rui Paulo Date: Sun, 12 Sep 2010 15:59:14 +0000 Subject: [PATCH] Give a chance to the target binary to run the ctors by waiting until it has reached main(). This allows plockstat to work. Sponsored by: The FreeBSD Foundation --- cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c index a8070e602ef7..962da1a884b9 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c @@ -1103,7 +1103,7 @@ dt_vopen(int version, int flags, int *errp, #if defined(sun) dtp->dt_prcmode = DT_PROC_STOP_PREINIT; #else - dtp->dt_prcmode = DT_PROC_STOP_POSTINIT; + dtp->dt_prcmode = DT_PROC_STOP_MAIN; #endif dtp->dt_linkmode = DT_LINK_KERNEL; dtp->dt_linktype = DT_LTYP_ELF;