summaryrefslogtreecommitdiffstats
path: root/userspace/ncrypto_internal.h
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-08-09 20:05:22 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-08-24 20:58:32 +0200
commit22aabeef3cb9344614cc9b58e9e97208df04e711 (patch)
treea6ad50c347395252015d0d648ab25cd69e2b09ba /userspace/ncrypto_internal.h
parentc8ccfedd9bfd53274800d39f58ed335db97caf1a (diff)
downloadcryptodev-linux-22aabeef3cb9344614cc9b58e9e97208df04e711.tar.gz
cryptodev-linux-22aabeef3cb9344614cc9b58e9e97208df04e711.tar.xz
cryptodev-linux-22aabeef3cb9344614cc9b58e9e97208df04e711.zip
Avoid unnecessary internal relocations
Use __attribute__((visibility("hidden"))) for __ncr_file_descriptor to take advantage of PIC addressing instead of going through the dynamic linker. Add an internal alias for ncr_global_init() for the same reason. Add an internal header file to consolidate the "extern" references in the process.
Diffstat (limited to 'userspace/ncrypto_internal.h')
-rw-r--r--userspace/ncrypto_internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/userspace/ncrypto_internal.h b/userspace/ncrypto_internal.h
new file mode 100644
index 0000000..29b2d8a
--- /dev/null
+++ b/userspace/ncrypto_internal.h
@@ -0,0 +1,8 @@
+#ifndef NCRYPTO_INTERNAL_H__
+#define NCRYPTO_INTERNAL_H__
+
+extern int __ncr_file_descriptor __attribute__((visibility ("hidden")));
+
+extern int __ncr_global_init(void) __attribute__((visibility ("hidden")));
+
+#endif