mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
LVM2 mirror repository
https://sourceware.org/lvm2/
82a27a85b5
Fix the version export macros to make it possible to export two different DM_* versions of a symbol: currently it is only possible for a DM_* symbol to override a symbol in Base. Attempting to export two symbols at different DM_* version levels (e.g. DM_1_02_104 and DM_1_02_106) leads to a linker error due to a duplicate symbol definition. This is because the DM_EXPORTED_SYMBOL macro makes each exported symbol the default (@@VERSION): __asm__(".symver " #func "_v" #ver ", " #func "@@DM_" #ver ) Fix the macro to use a single '@' for a symbols exported in multiple versions and rename the macros to DM_EXPORT_*: DM_EXPORT_SYMBOL(func,ver) DM_EXPORT_SYMBOL_BASE(func,ver) For functions that have multiple implementations these macros control symbol export and versioning. Function definitions that exist in only one version never need to use these macros. Backwards compatible implementations must include a version tag of the form "_v1_02_104" as a suffix to the function name and use the macro DM_EXPORT_SYMBOL to export the function and bind it to the specified version string. Since versioning is only available when compiling with GCC the entire compatibility version should be enclosed in '#if defined(__GNUC__)', for example: int dm_foo(int bar) { return bar; } #if defined(__GNUC__) // Backward compatible dm_foo() version 1.02.104 int dm_foo_v1_02_104(void); int dm_foo_v1_02_104(void) { return 0; } DM_EXPORT_SYMBOL(dm_foo,1_02_104) #endif A prototype for the compatibility version is required as these functions must not be declared static. The DM_EXPORT_SYMBOL_BASE macro is only used to export the base versions of library symbols prior to the introduction of symbol versioning: it must never be used for new symbols. |
||
---|---|---|
autoconf | ||
conf | ||
daemons | ||
doc | ||
include | ||
lib | ||
libdaemon | ||
libdm | ||
liblvm | ||
man | ||
nix | ||
old-tests | ||
po | ||
python | ||
report-generators | ||
reports | ||
scripts | ||
spec | ||
test | ||
tools | ||
udev | ||
unit-tests | ||
.gitignore | ||
acinclude.m4 | ||
aclocal.m4 | ||
configure | ||
configure.in | ||
COPYING | ||
COPYING.LIB | ||
INSTALL | ||
make.tmpl.in | ||
Makefile.in | ||
README | ||
VERSION | ||
VERSION_DM | ||
WHATS_NEW | ||
WHATS_NEW_DM |
This tree contains the LVM2 and device-mapper tools and libraries. For more information about LVM2 read the changelog in the WHATS_NEW file. Installation instructions are in INSTALL. There is no warranty - see COPYING and COPYING.LIB. Tarballs are available from: ftp://sources.redhat.com/pub/lvm2/ The source code is stored in git: http://git.fedorahosted.org/git/lvm2.git git clone git://git.fedorahosted.org/git/lvm2.git Mailing list for general discussion related to LVM2: linux-lvm@redhat.com Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm Mailing lists for LVM2 development, patches and commits: lvm-devel@redhat.com Subscribe from https://www.redhat.com/mailman/listinfo/lvm-devel lvm2-commits@lists.fedorahosted.org (Read-only archive of commits) Subscribe from https://fedorahosted.org/mailman/listinfo/lvm2-commits Mailing list for device-mapper development, including kernel patches and multipath-tools: dm-devel@redhat.com Subscribe from https://www.redhat.com/mailman/listinfo/dm-devel The source code repository used until 7th June 2012 is accessible here: http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/?cvsroot=lvm2.