Use symbol visibility attribute to define exported symbols.

To be used in conjunction with the linker script.

Should allow for better optimization, see:

http://www.akkadia.org/drepper/dsohowto.pdf

Section 2.1
Symbol versioning.

Assign FABRIC_1.0 versions to all exported symbols and modify function
definitions to allow for redefining in the future.

With this scheme the following illustrative patch would:

1) add a new fi_getinfo function that does not take a version argument
2) retain the old defn object code so existing linked programs will work

diff --git a/include/fi.h b/include/fi.h
index 4be17bc..aae11f8 100644
--- a/include/fi.h
+++ b/include/fi.h
@@ -166,8 +166,11 @@ int fi_version_register(uint32_t version, struct fi_provider *provider);
 /* symbol -> external symbol mappings */
 #ifdef HAVE_SYMVER_SUPPORT

-/* FABRIC_1.0: default symbol set must match linker script */
-#define FABRIC_10(SYM, ESYM) asm(".symver " #SYM","#ESYM"@@FABRIC_1.0");
+/* FABRIC_1.0: compat symbol set must match linker script */
+#define FABRIC_10(SYM, ESYM) asm(".symver " #SYM","#ESYM"@FABRIC_1.0");
+
+/* FABRIC_2.0: default symbol set must match linker script */
+#define FABRIC_20(SYM, ESYM) asm(".symver " #SYM","#ESYM"@@FABRIC_2.0");

 #else
 #define FABRIC_10(SYM, ESYM)
diff --git a/include/rdma/fabric.h b/include/rdma/fabric.h
index 6e3f00a..1610eb9 100644
--- a/include/rdma/fabric.h
+++ b/include/rdma/fabric.h
@@ -276,7 +276,7 @@ struct fid {

 #define FI_NUMERICHOST         (1ULL << 1)

-int fi_getinfo(uint32_t version, const char *node, const char *service,
+int fi_getinfo(const char *node, const char *service,
               uint64_t flags, struct fi_info *hints, struct fi_info **info);
 void fi_freeinfo(struct fi_info *info);

diff --git a/libfabric.map b/libfabric.map
index a87ee5f..748fe90 100644
--- a/libfabric.map
+++ b/libfabric.map
@@ -9,3 +9,6 @@ FABRIC_1.0 {
                fi_tostr;
        local: *;
 };
+FABRIC_2.0 {
+
+} FABRIC_1.0;
diff --git a/src/fabric.c b/src/fabric.c
index 108aac9..bd24f4b 100644
--- a/src/fabric.c
+++ b/src/fabric.c
@@ -186,6 +186,14 @@ _EAPI fi_getinfo_(uint32_t version, const char *node, const char *service,
 }
 FABRIC_10(fi_getinfo_, fi_getinfo);

+int
+_EAPI fi_getinfo_2(const char *node, const char *service,
+              uint64_t flags, struct fi_info *hints, struct fi_info **info)
+{
+       return fi_getinfo_(fi_version(), node, service, flags, hints, info);
+}
+FABRIC_20(fi_getinfo_2, fi_getinfo)
+
 void
 _EAPI fi_freeinfo_(struct fi_info *info)
 {