Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/csu/common For some mind-boogling reasons, GCC 5.4 belie...



details:   https://anonhg.NetBSD.org/src/rev/78d8624d49b8
branches:  trunk
changeset: 816296:78d8624d49b8
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Jun 29 11:16:47 2016 +0000

description:
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.

diffstat:

 lib/csu/common/crtbegin.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r 14e5d87eb295 -r 78d8624d49b8 lib/csu/common/crtbegin.c
--- a/lib/csu/common/crtbegin.c Wed Jun 29 07:29:04 2016 +0000
+++ b/lib/csu/common/crtbegin.c Wed Jun 29 11:16:47 2016 +0000
@@ -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 @@
        __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 @@
 
 #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,



Home | Main Index | Thread Index | Old Index