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:
Ed Maste 2018-10-31 14:19:58 +00:00
parent d0a84acdfa
commit 57706376c6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339954

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
};