diff options
author | Andy Polyakov <appro@openssl.org> | 2011-07-22 09:42:11 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2011-07-22 09:42:11 +0000 |
commit | 167cb62537854908ba44a4aadb4e03f750297569 (patch) | |
tree | 62528da8e5f745c75163c0e6e6679eaa3855285b /fips/fips_canister.c | |
parent | 4f275f248ecc866212d4636e1255bd8ca3fb1f28 (diff) | |
download | openssl-new-167cb62537854908ba44a4aadb4e03f750297569.tar.gz |
fips_canister.c: add support for embedded ppc linux.
Diffstat (limited to 'fips/fips_canister.c')
-rw-r--r-- | fips/fips_canister.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/fips/fips_canister.c b/fips/fips_canister.c index 08d07e4b00..a1f8400479 100644 --- a/fips/fips_canister.c +++ b/fips/fips_canister.c @@ -29,7 +29,8 @@ const void *FIPS_text_end(void); #if !defined(FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE) # if (defined(__ANDROID__) && (defined(__arm__) || defined(__arm))) || \ - (defined(__vxworks) && (defined(__ppc__) || defined(__ppc))) + (defined(__vxworks) && (defined(__ppc__) || defined(__ppc))) || \ + (defined(__linux) && defined(__PPC__) && !defined(__PPC64__)) # define FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE # endif #endif @@ -46,7 +47,10 @@ static void *instruction_pointer_xlc(void); #endif #ifdef FIPS_START -#define FIPS_ref_point FIPS_text_start +# define FIPS_ref_point FIPS_text_start +# ifdef FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE +# define instruction_pointer FIPS_text_startX +# endif /* Some compilers put string literals into a separate segment. As we * are mostly interested to hash AES tables in .rodata, we declare * reference points accordingly. In case you wonder, the values are @@ -55,7 +59,10 @@ static void *instruction_pointer_xlc(void); const unsigned int FIPS_rodata_start[]= { 0x46495053, 0x5f726f64, 0x6174615f, 0x73746172 }; #else -#define FIPS_ref_point FIPS_text_end +# define FIPS_ref_point FIPS_text_end +# ifdef FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE +# define instruction_pointer FIPS_text_endX +# endif const unsigned int FIPS_rodata_end[]= { 0x46495053, 0x5f726f64, 0x6174615f, 0x656e645b }; #endif @@ -150,7 +157,7 @@ static void *instruction_pointer(void) const void *FIPS_ref_point() { #if defined(FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE) - return (void *)FIPS_ref_point; + return (void *)instruction_pointer; #elif defined(INSTRUCTION_POINTER_IMPLEMENTED) return instruction_pointer(); /* Below we essentially cover vendor compilers which do not support |