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/net/vnet.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/net/vnet.h')
-rw-r--r-- | sys/net/vnet.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/vnet.h b/sys/net/vnet.h index 1453194..beecd43 100644 --- a/sys/net/vnet.h +++ b/sys/net/vnet.h @@ -95,9 +95,7 @@ struct vnet { * Location of the kernel's 'set_vnet' linker set. */ extern uintptr_t *__start_set_vnet; -__GLOBL(__start_set_vnet); extern uintptr_t *__stop_set_vnet; -__GLOBL(__stop_set_vnet); #define VNET_START (uintptr_t)&__start_set_vnet #define VNET_STOP (uintptr_t)&__stop_set_vnet @@ -195,7 +193,10 @@ extern struct sx vnet_sxlock; */ #define VNET_NAME(n) vnet_entry_##n #define VNET_DECLARE(t, n) extern t VNET_NAME(n) -#define VNET_DEFINE(t, n) t VNET_NAME(n) __section(VNET_SETNAME) __used +#define VNET_DEFINE(t, n) \ + __GLOBL("__start_" VNET_SETNAME); \ + __GLOBL("__stop_" VNET_SETNAME); \ + t VNET_NAME(n) __section(VNET_SETNAME) __used #define STATIC_VNET_DEFINE(t, n) \ VNET_DEFINE(static t, n) #define _VNET_PTR(b, n) \ |