summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2009-08-09 15:40:52 -0700
committerRoland McGrath <[email protected]>2009-08-09 15:40:52 -0700
commitebfb6484d5e164f2b7f428a8c92d55c4083f55fd (patch)
treee017186eebddb022eb1d05dba54f2ba34fa6533a /lib
parentde0bef87168df49c27af8f2040bed258a9bddb61 (diff)
New macros for symbol versioning definitions, use them for libdw convenience wrappers just changed.
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog4
-rw-r--r--lib/eu-config.h17
2 files changed, 21 insertions, 0 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 06991826..73f8e73a 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,7 @@
+2009-08-09 Roland McGrath <[email protected]>
+
+ * eu-config.h (OLD_VERSION, NEW_VERSION, COMPAT_VERSION): New macros.
+
2009-01-23 Roland McGrath <[email protected]>
* eu-config.h: Add multiple inclusion protection.
diff --git a/lib/eu-config.h b/lib/eu-config.h
index 32f501ae..f814604f 100644
--- a/lib/eu-config.h
+++ b/lib/eu-config.h
@@ -183,4 +183,21 @@ asm (".section predict_data, \"aw\"; .previous\n"
#define ELFUTILS_HEADER(name) <lib##name.h>
+#ifdef SHARED
+# define OLD_VERSION(name, version) \
+ asm (".globl _compat." #version "." #name "\n" \
+ "_compat." #version "." #name " = " #name "\n" \
+ ".symver _compat." #version "." #name "," #name "@" #version);
+# define NEW_VERSION(name, version) \
+ asm (".symver " #name "," #name "@@@" #version);
+# define COMPAT_VERSION(name, version, prefix) \
+ asm (".symver _compat." #version "." #name "," #name "@" #version); \
+ __typeof (name) _compat_##prefix##_##name asm ("_compat." #version "." #name);
+#else
+# define OLD_VERSION(name, version) /* Nothing for static linking. */
+# define NEW_VERSION(name, version) /* Nothing for static linking. */
+# define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SHARED"
+#endif
+
+
#endif /* eu-config.h */