Allow for dynamic base in Win64 FIPS module.
[openssl.git] / fips / fips_canister.c
index a1f84004793fe3441678346b7af31dce7c50d3f9..a209172f437d41aa42b6b6c2fd0e3e7f1aa49d86 100644 (file)
@@ -56,6 +56,10 @@ static void *instruction_pointer_xlc(void);
  * reference points accordingly. In case you wonder, the values are
  * big-endian encoded variable names, just to prevent these arrays
  * from being merged by linker. */
+# if defined(_MSC_VER) && defined(_WIN64)
+#  pragma section("fipsro$a",read)
+   __declspec(allocate("fipsro$a"))
+# endif
 const unsigned int FIPS_rodata_start[]=
        { 0x46495053, 0x5f726f64, 0x6174615f, 0x73746172 };
 #else
@@ -63,6 +67,10 @@ const unsigned int FIPS_rodata_start[]=
 # ifdef FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE
 #  define instruction_pointer  FIPS_text_endX
 # endif
+# if defined(_MSC_VER) && defined(_WIN64)
+#  pragma section("fipsro$c",read)
+   __declspec(allocate("fipsro$c"))
+# endif
 const unsigned int FIPS_rodata_end[]=
        { 0x46495053, 0x5f726f64, 0x6174615f, 0x656e645b };
 #endif