summaryrefslogtreecommitdiffstats
path: root/sys/sys/linker_set.h
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2010-11-11 19:17:59 +0000
committerdim <dim@FreeBSD.org>2010-11-11 19:17:59 +0000
commit2175fbcfd1c7c37de76d66e618c6ea099fdc40b5 (patch)
tree6b155f37d3411c7af921fcc430bc35d376ca887f /sys/sys/linker_set.h
parent3becc780dadbbebcf88ddecaefab42b0720f39f3 (diff)
downloadFreeBSD-src-2175fbcfd1c7c37de76d66e618c6ea099fdc40b5.zip
FreeBSD-src-2175fbcfd1c7c37de76d66e618c6ea099fdc40b5.tar.gz
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
Diffstat (limited to 'sys/sys/linker_set.h')
-rw-r--r--sys/sys/linker_set.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/linker_set.h b/sys/sys/linker_set.h
index 5f55beb..2edb55b 100644
--- a/sys/sys/linker_set.h
+++ b/sys/sys/linker_set.h
@@ -45,6 +45,8 @@
*/
#ifdef __GNUCLIKE___SECTION
#define __MAKE_SET(set, sym) \
+ __GLOBL(__CONCAT(__start_set_,set)); \
+ __GLOBL(__CONCAT(__stop_set_,set)); \
static void const * const __set_##set##_sym_##sym \
__section("set_" #set) __used = &sym
#else /* !__GNUCLIKE___SECTION */
OpenPOWER on IntegriCloud