Introduced macro B_DEFINE_SYMBOL_VERSION() in <BeBuild.h> to help with

versioning symbols, and private macro DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION()
for symbols compiled into both libroot and kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30828 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-05-22 14:57:40 +00:00
parent 544e3d2523
commit 897514785a
2 changed files with 23 additions and 0 deletions

View File

@ -48,4 +48,7 @@
#define _EXPORT
#define _IMPORT
#define B_DEFINE_SYMBOL_VERSION(function, versionedSymbol) \
__asm__(".symver " function "," versionedSymbol)
#endif /* _BE_BUILD_H */

View File

@ -0,0 +1,20 @@
/*
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
* Distributed under the terms of the MIT License.
*/
#ifndef _SYMBOL_VERSIONING_H
#define _SYMBOL_VERSIONING_H
#include <BeBuild.h>
#ifdef _KERNEL_MODE
# define DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION(function, symbol, version) \
B_DEFINE_SYMBOL_VERSION(function, symbol "KERNEL_" version)
#else
# define DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION(function, symbol, version) \
B_DEFINE_SYMBOL_VERSION(function, symbol "LIBROOT_" version)
#endif
#endif /* _SYMBOL_VERSIONING_H */