summaryrefslogtreecommitdiffstats
path: root/sys/sys/linker_set.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-09-23 06:11:29 +0000
committerpeter <peter@FreeBSD.org>2002-09-23 06:11:29 +0000
commit1e5c466a5216b4f283c29f68b3e51d08a99833fc (patch)
treef435ca08a2637edc0d7163be9df09b4b3f9e46f9 /sys/sys/linker_set.h
parent5f1e8c6326db2601e1228565e996830319ae2a42 (diff)
downloadFreeBSD-src-1e5c466a5216b4f283c29f68b3e51d08a99833fc.zip
FreeBSD-src-1e5c466a5216b4f283c29f68b3e51d08a99833fc.tar.gz
Add a __section(x) macro as well. Use this in linker_set.h. ie:
static void const * const __set_##set##_sym_##sym __attribute__((__section__("set_" #set),__unused__)) = &sym becomes: static void const * const __set_##set##_sym_##sym __section("set_" #set) __unused = &sym Like the other macros, these #define away for unrecognized compilers or lint. Also, fix the argments in the previous commit for the non-gcc case. lint might be a bit happier about that. Note that the gcc <= 2.6 case needs some research.
Diffstat (limited to 'sys/sys/linker_set.h')
-rw-r--r--sys/sys/linker_set.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/linker_set.h b/sys/sys/linker_set.h
index ee60ffd..f025e18d 100644
--- a/sys/sys/linker_set.h
+++ b/sys/sys/linker_set.h
@@ -42,7 +42,7 @@
#ifdef __GNUC__
#define __MAKE_SET(set, sym) \
static void const * const __set_##set##_sym_##sym \
- __attribute__((__section__("set_" #set),__unused__)) = &sym
+ __section("set_" #set) __unused = &sym
#else /* !__GNUC__ */
#ifndef lint
#error "This file needs to be compiled by GCC or lint"
OpenPOWER on IntegriCloud