]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - fips/fips_premain.c
PowerPC assembly pack: add POWER8 support.
[thirdparty/openssl.git] / fips / fips_premain.c
index fc448d0eaaa1f989a296630fb86e733af055d218..b6ec32db4e3b313b0e98aae6ffeef1bf623ba8f0 100644 (file)
@@ -7,7 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(__unix) || defined(__unix__) || defined(__vxworks) || defined(__ANDROID__)
+#if defined(__unix) || defined(__unix__) || defined(__vxworks) || defined(__ANDROID__) || defined(__APPLE__)
 #include <unistd.h>
 #endif
 
   int lib$initialize();
   globaldef int (*lib_init_ref)() = lib$initialize;
 # pragma __standard
+#elif defined(_TMS320C6X)
+# if defined(__TI_EABI__)
+  asm("\t.sect \".init_array\"\n\t.align 4\n\t.field FINGERPRINT_premain,32");
+# else
+  asm("\t.sect \".pinit\"\n\t.align 4\n\t.field _FINGERPRINT_premain,32");
+# endif
 #elif 0
   The rest has to be taken care of through command line:
 
@@ -69,7 +75,8 @@
 #endif
 
 #if defined(_MSC_VER)
-# pragma section("fipsro",read)
+# pragma const_seg("fipsro")
+# pragma const_seg()
   __declspec(allocate("fipsro"))
 #endif
 static const unsigned char FINGERPRINT_ascii_value[41] = HMAC_SHA1_SIG;
@@ -133,6 +140,9 @@ void FINGERPRINT_premain(void)
        }
 #endif
     } while(0);
+#if defined(__powerpc__) || defined(__ppc__) || defined(_ARCH_PPC)
+    fips_openssl_cpuid_setup();
+#endif
 }
 
 #else