Add __used to __CTOR_LIST__ and __DTOR_LIST__

Enabling BSD_CRTBEGIN on amd64 resulted in
error: unused variable '__CTOR_LIST__'.

__CTOR_LIST__ is indeed unused in crtbegin.c; it marks the beginning of
the .ctors array and is used in crtend.c.  Annotate __DTOR_LIST__ as
well for consistency.

Discussed with:	andrew
MFC with:	r339738
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
emaste 2018-10-31 14:19:58 +00:00
parent f1f6ac0e5f
commit d7f804e35b

View File

@ -45,10 +45,10 @@ void *__dso_handle = 0;
#ifdef HAVE_CTORS
static void __do_global_dtors_aux(void) __used;
static crt_func __CTOR_LIST__[] __section(".ctors") = {
static crt_func __CTOR_LIST__[] __section(".ctors") __used = {
(crt_func)-1
};
static crt_func __DTOR_LIST__[] __section(".dtors") = {
static crt_func __DTOR_LIST__[] __section(".dtors") __used = {
(crt_func)-1
};