Add __dso_handle to the BSD crtbegin. This is used to identify shared

objects.

MFC with:	r339738
Sponsored by:	DARPA, AFRL
This commit is contained in:
andrew 2018-10-26 11:53:20 +00:00
parent 265606d643
commit 1f5206e35e

View File

@ -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.