Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2018 11:53:20 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339773 - head/lib/csu/common
Message-ID:  <201810261153.w9QBrK60007518@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Fri Oct 26 11:53:20 2018
New Revision: 339773
URL: https://svnweb.freebsd.org/changeset/base/339773

Log:
  Add __dso_handle to the BSD crtbegin. This is used to identify shared
  objects.
  
  MFC with:	r339738
  Sponsored by:	DARPA, AFRL

Modified:
  head/lib/csu/common/crtbegin.c

Modified: head/lib/csu/common/crtbegin.c
==============================================================================
--- head/lib/csu/common/crtbegin.c	Fri Oct 26 10:20:03 2018	(r339772)
+++ head/lib/csu/common/crtbegin.c	Fri Oct 26 11:53:20 2018	(r339773)
@@ -30,6 +30,14 @@ __FBSDID("$FreeBSD$");
 
 typedef void (*crt_func)(void);
 
+extern void *__dso_handle __hidden;
+
+#ifdef SHARED
+void *__dso_handle = &__dso_handle;
+#else
+void *__dso_handle = 0;
+#endif
+
 /*
  * On some architectures and toolchains we may need to call the .dtors.
  * These are called in the order they are in the ELF file.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810261153.w9QBrK60007518>