aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/cdefs.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2010-11-11 19:17:59 +0000
committerDimitry Andric <dim@FreeBSD.org>2010-11-11 19:17:59 +0000
commit566af50bd26d7739d1e62d23438b32aef21383eb (patch)
tree6b155f37d3411c7af921fcc430bc35d376ca887f /sys/sys/cdefs.h
parent37e13fa27f8a09f34167567473858e1489ce072a (diff)
downloadsrc-566af50bd26d7739d1e62d23438b32aef21383eb.tar.gz
src-566af50bd26d7739d1e62d23438b32aef21383eb.zip
Revert r103230, which depended on ld preserving the __start_xxx and
__stop_xxx symbols for custom sections, even when these were not referenced (at link time). This behaviour was changed again in binutils commit 0b8ed435c3fe8bd09a08c23920e65bfb03251221. This time, put the __GLOBL macro definition in cdefs.h, so it can be reused in a few other places where it will be needed. Reviewed by: kib
Notes
Notes: svn path=/head/; revision=215137
Diffstat (limited to 'sys/sys/cdefs.h')
-rw-r--r--sys/sys/cdefs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index bcb4367f30c1..958c74d5ff6a 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -401,6 +401,9 @@
#endif /* __STDC__ */
#endif /* __GNUC__ || __INTEL_COMPILER */
+#define __GLOBL1(sym) __asm__(".globl " #sym)
+#define __GLOBL(sym) __GLOBL1(sym)
+
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
#define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"")
#else