Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2018 14:19:58 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339954 - head/lib/csu/common
Message-ID:  <201810311419.w9VEJwmA023123@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Wed Oct 31 14:19:58 2018
New Revision: 339954
URL: https://svnweb.freebsd.org/changeset/base/339954

Log:
  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

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

Modified: head/lib/csu/common/crtbegin.c
==============================================================================
--- head/lib/csu/common/crtbegin.c	Wed Oct 31 14:03:48 2018	(r339953)
+++ head/lib/csu/common/crtbegin.c	Wed Oct 31 14:19:58 2018	(r339954)
@@ -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
 };
 



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