Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/sys Pull up following revision(s) (requested by joerg...
details: https://anonhg.NetBSD.org/src/rev/e72f541326c9
branches: netbsd-7
changeset: 798700:e72f541326c9
user: martin <martin%NetBSD.org@localhost>
date: Sat Dec 13 19:13:25 2014 +0000
description:
Pull up following revision(s) (requested by joerg in ticket #316):
sys/sys/cdefs_elf.h: revision 1.47
Add macro to mark a symbol as weak. Use it to mark the end of a linker
set as empty linker set otherwise violate the aliasing rules of C by
presenting zero sized objects.
diffstat:
sys/sys/cdefs_elf.h | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r ff8e651895e8 -r e72f541326c9 sys/sys/cdefs_elf.h
--- a/sys/sys/cdefs_elf.h Sat Dec 13 18:56:34 2014 +0000
+++ b/sys/sys/cdefs_elf.h Sat Dec 13 19:13:25 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cdefs_elf.h,v 1.44 2014/05/13 19:58:23 christos Exp $ */
+/* $NetBSD: cdefs_elf.h,v 1.44.2.1 2014/12/13 19:13:25 martin Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -65,6 +65,12 @@
__asm(".weak " _C_LABEL_STRING(#sym));
#if __GNUC_PREREQ__(4, 0)
+#define __weak __attribute__((__weak__))
+#else
+#define __weak
+#endif
+
+#if __GNUC_PREREQ__(4, 0)
#define __weak_reference(sym) __attribute__((__weakref__(#sym)))
#else
#define __weak_reference(sym) ; __asm(".weak " _C_LABEL_STRING(#sym))
@@ -157,7 +163,7 @@
#define __link_set_decl(set, ptype) \
extern ptype * const __link_set_start(set)[] __dso_hidden; \
- extern ptype * const __link_set_end(set)[] __dso_hidden
+ extern ptype * const __link_set_end(set)[] __weak __dso_hidden
#define __link_set_count(set) \
(__link_set_end(set) - __link_set_start(set))
Home |
Main Index |
Thread Index |
Old Index