Date: Mon, 29 Oct 2018 17:55:26 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339866 - head/lib/csu/common Message-ID: <201810291755.w9THtQLx043644@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Mon Oct 29 17:55:26 2018 New Revision: 339866 URL: https://svnweb.freebsd.org/changeset/base/339866 Log: Make the .ctors, .dtors, and .jcr markers as static. They shouldn't be accessible from out of the files they are defined in. MFC with: r339738 Sponsored by: DARPA, AFRL Modified: head/lib/csu/common/crtbegin.c head/lib/csu/common/crtend.c Modified: head/lib/csu/common/crtbegin.c ============================================================================== --- head/lib/csu/common/crtbegin.c Mon Oct 29 17:13:12 2018 (r339865) +++ head/lib/csu/common/crtbegin.c Mon Oct 29 17:55:26 2018 (r339866) @@ -45,10 +45,10 @@ void *__dso_handle = 0; #ifdef HAVE_CTORS static void __do_global_dtors_aux(void) __used; -crt_func __CTOR_LIST__[] __section(".ctors") __hidden = { +static crt_func __CTOR_LIST__[] __section(".ctors") = { (crt_func)-1 }; -crt_func __DTOR_LIST__[] __section(".dtors") __hidden = { +static crt_func __DTOR_LIST__[] __section(".dtors") = { (crt_func)-1 }; @@ -81,7 +81,7 @@ asm ( extern void _Jv_RegisterClasses(void *) __weak_symbol; static void register_classes(void) __used; -crt_func __JCR_LIST__[] __section(".jcr") __used __hidden = { }; +static crt_func __JCR_LIST__[] __section(".jcr") __used = { }; #ifndef CTORS_CONSTRUCTORS __attribute__((constructor)) Modified: head/lib/csu/common/crtend.c ============================================================================== --- head/lib/csu/common/crtend.c Mon Oct 29 17:13:12 2018 (r339865) +++ head/lib/csu/common/crtend.c Mon Oct 29 17:55:26 2018 (r339866) @@ -35,10 +35,10 @@ typedef void (*crt_func)(void); */ static void __do_global_ctors_aux(void) __used; -crt_func __CTOR_END__[] __section(".ctors") __used __hidden = { +static crt_func __CTOR_END__[] __section(".ctors") __used = { (crt_func)0 }; -crt_func __DTOR_END__[] __section(".dtors") __used __hidden = { +static crt_func __DTOR_END__[] __section(".dtors") __used = { (crt_func)0 };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810291755.w9THtQLx043644>