1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
LVM2 mirror repository https://sourceware.org/lvm2/
Go to file
Bryn M. Reeves 82a27a85b5 macros: fix default symbol export control
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.
2015-08-24 20:03:21 +01:00
autoconf autoconf: Update config.guess/sub to 2014-01-01. 2014-01-21 22:00:15 +00:00
conf conf: Regenerate example.conf. 2015-08-17 16:51:43 +01:00
daemons lvmlockd: fix sending debug info to lvmlockctl 2015-08-20 14:07:11 -05:00
doc doc: mention new invalid states in lvmetad_design 2015-06-23 16:48:28 -05:00
include include: Standardise around new tool.h. 2015-07-06 17:30:18 +01:00
lib macros: fix default symbol export control 2015-08-24 20:03:21 +01:00
libdaemon cleanup: move var declaration 2015-08-18 16:05:04 +02:00
libdm macros: fix default symbol export control 2015-08-24 20:03:21 +01:00
liblvm toolcontext: add switches to create_toolcontext for connections and filters init 2015-07-30 13:54:09 +02:00
man man: fix sqm typo 2015-08-21 15:35:45 +02:00
nix lockd: Clean up spec 2015-07-04 14:36:57 +02:00
old-tests report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
po makefiles: disable po file targes 2015-05-14 14:19:40 +02:00
python gitignore: Update for in-place build. 2015-07-27 13:18:35 +01:00
report-generators add copyright notices to new files 2010-07-28 12:20:38 +00:00
reports [REPORT-GENERATORS] cut down stylsheet.css to what we actually use 2010-07-21 10:00:38 +00:00
scripts gitignore: Update for in-place build. 2015-07-27 13:18:35 +01:00
spec spec: Add cache-*.profile 2015-08-14 21:45:11 +02:00
test tests: fix check for lvmlockd test 2015-08-21 17:00:21 -05:00
tools cache: enable setting cachepolicy in lvconvert 2015-08-21 15:35:45 +02:00
udev udev: fix missing escape for + 2015-08-12 19:46:44 +02:00
unit-tests cleanup: use DM_ARRAY_SIZE 2014-04-08 11:00:15 +02:00
.gitignore gitignore: Update for in-place build. 2015-07-27 13:18:35 +01:00
acinclude.m4 configure: detect st_ctim 2015-03-18 13:42:24 +01:00
aclocal.m4 configure: LOCALEDIR needs evaluated value 2015-05-18 13:06:34 +02:00
configure configure: check for -lm and log10 function 2015-08-18 15:25:54 +01:00
configure.in configure: check for -lm and log10 function 2015-08-18 15:25:54 +01:00
COPYING Outline docs 2001-12-31 16:12:40 +00:00
COPYING.LIB Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
INSTALL quick review of docs 2008-11-04 17:49:22 +00:00
make.tmpl.in configure: check for -lm and log10 function 2015-08-18 15:25:54 +01:00
Makefile.in test: Update Makefiles 2015-07-30 20:39:38 +02:00
README README: fix link to lvm-devel mailing list 2015-03-31 15:44:00 +02:00
VERSION post-release 2015-08-17 17:26:20 +01:00
VERSION_DM post-release 2015-08-17 17:26:20 +01:00
WHATS_NEW WHATS_NEW 2015-08-21 15:37:56 +02:00
WHATS_NEW_DM post-release 2015-08-17 17:26:20 +01:00

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.