From owner-svn-src-all@FreeBSD.ORG Sun Sep 12 15:59:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77030106564A; Sun, 12 Sep 2010 15:59:14 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65A078FC1A; Sun, 12 Sep 2010 15:59:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8CFxEU8070652; Sun, 12 Sep 2010 15:59:14 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8CFxEIx070650; Sun, 12 Sep 2010 15:59:14 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201009121559.o8CFxEIx070650@svn.freebsd.org> From: Rui Paulo Date: Sun, 12 Sep 2010 15:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212495 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 15:59:14 -0000 Author: rpaulo Date: Sun Sep 12 15:59:14 2010 New Revision: 212495 URL: http://svn.freebsd.org/changeset/base/212495 Log: 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 Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun Sep 12 14:12:16 2010 (r212494) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun Sep 12 15:59:14 2010 (r212495) @@ -1103,7 +1103,7 @@ alloc: #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;