diff options
author | dim <dim@FreeBSD.org> | 2010-11-14 20:40:55 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-11-14 20:40:55 +0000 |
commit | 02778a6df67bca2283e2b9d79262fe0692dab2d4 (patch) | |
tree | 76a6c820ce8838f6029104fb889ee1dbd0ea6d9b /sys/sys/pcpu.h | |
parent | fda4020a881f36122bca03f2d8327da8bc67863d (diff) | |
download | FreeBSD-src-02778a6df67bca2283e2b9d79262fe0692dab2d4.zip FreeBSD-src-02778a6df67bca2283e2b9d79262fe0692dab2d4.tar.gz |
Instead of unconditionally emitting .globl's for the __start_set_xxx and
__stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu
sections are actually defined.
Diffstat (limited to 'sys/sys/pcpu.h')
-rw-r--r-- | sys/sys/pcpu.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h index d18a150..81fd783 100644 --- a/sys/sys/pcpu.h +++ b/sys/sys/pcpu.h @@ -51,9 +51,7 @@ * Define a set for pcpu data. */ extern uintptr_t *__start_set_pcpu; -__GLOBL(__start_set_pcpu); extern uintptr_t *__stop_set_pcpu; -__GLOBL(__stop_set_pcpu); /* * Array of dynamic pcpu base offsets. Indexed by id. @@ -75,7 +73,10 @@ extern uintptr_t dpcpu_off[]; */ #define DPCPU_NAME(n) pcpu_entry_##n #define DPCPU_DECLARE(t, n) extern t DPCPU_NAME(n) -#define DPCPU_DEFINE(t, n) t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used +#define DPCPU_DEFINE(t, n) \ + __GLOBL("__start_" DPCPU_SETNAME); \ + __GLOBL("__stop_" DPCPU_SETNAME); \ + t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used #define STATIC_DPCPU_DEFINE(t, n) \ DPCPU_DEFINE(static t, n) |