Module Name:    src
Committed By:   joerg
Date:           Wed Jun 29 11:16:47 UTC 2016

Modified Files:
        src/lib/csu/common: crtbegin.c

Log Message:
For some mind-boogling reasons, GCC 5.4 believes that a weak reference
cannot alias with an extern. While this is clearly bogus, avoid yet
another alias handling bug and use strong aliases. It's actually
slightly simpler, too.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/csu/common/crtbegin.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/csu/common/crtbegin.c
diff -u src/lib/csu/common/crtbegin.c:1.12 src/lib/csu/common/crtbegin.c:1.13
--- src/lib/csu/common/crtbegin.c:1.12	Tue Jun  7 12:07:35 2016
+++ src/lib/csu/common/crtbegin.c	Wed Jun 29 11:16:47 2016
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: crtbegin.c,v 1.12 2016/06/07 12:07:35 joerg Exp $");
+__RCSID("$NetBSD: crtbegin.c,v 1.13 2016/06/29 11:16:47 joerg Exp $");
 
 #include "crtbegin.h"
 
@@ -39,8 +39,7 @@ __weakref_visible void Jv_RegisterClasse
 	__weak_reference(_Jv_RegisterClasses);
 
 #if !defined(HAVE_INITFINI_ARRAY)
-__weakref_visible const fptr_t __CTOR_LIST__start
-    __weak_reference(__CTOR_LIST__);
+extern __dso_hidden const fptr_t __CTOR_LIST__start __asm("__CTOR_LIST__");
 
 __dso_hidden const fptr_t __aligned(sizeof(void *)) __CTOR_LIST__[] __section(".ctors") = {
 	(fptr_t) -1,
@@ -101,8 +100,7 @@ __do_global_ctors_aux(void)
 
 #if !defined(__ARM_EABI__) || defined(SHARED) || defined(__ARM_DWARF_EH__)
 #if !defined(HAVE_INITFINI_ARRAY)
-__weakref_visible const fptr_t __DTOR_LIST__start
-    __weak_reference(__DTOR_LIST__);
+extern __dso_hidden const fptr_t __DTOR_LIST__start __asm("__DTOR_LIST__");
 
 __dso_hidden const fptr_t __aligned(sizeof(void *)) __DTOR_LIST__[] __section(".dtors") = {
 	(fptr_t) -1,

Reply via email to