From 57706376c63d433935dbadcbee514c6eb7a395cd Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 31 Oct 2018 14:19:58 +0000 Subject: [PATCH] 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 --- lib/csu/common/crtbegin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/csu/common/crtbegin.c b/lib/csu/common/crtbegin.c index bd51fec3d5c5..35231fa904f9 100644 --- a/lib/csu/common/crtbegin.c +++ b/lib/csu/common/crtbegin.c @@ -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 };