From: John R. <jr...@bi...> - 2018-06-30 05:17:13
|
>> To make progress in the meantime, replace those 32 bits by the two instructions >> mov r0,#0 >> mov r1,#0 >> which clear general registers r0 and r1. This is a guess that zeroes >> mean "this CPU has no such hardware assist". The libcrypto software >> will choose slower but equivalent code, instead of using >> any special hardware assist. > How do I "replace" those 32 bits with instructions before the library is loaded at run-time ? If you have the source for libcrypto.so.1.1, which is in software package openssl-1.1.0h (or openssl-libs-1.1.0h depending on your Linux distro) then in file crypto/armv4cpuid.pl change to: ===== _armv7_tick: #ifdef __APPLE__ mrrc p15,0,r0,r1,c14 @ CNTPCT #else @ mrrc p15,1,r0,r1,c14 @ CNTVCT <<< COMMENTED OUT mov r0,#0 @ replacement for valgrind-3.13 mov r1,#0 @ replacement for valgrind-3.13 #endif bx lr ===== Build from the modified source, and install the modified shared library. If you don't have source, then use a hex (binary) editor such as hexedit. Assemble a one-instruction program "mov r0,#0", then over-write the bytes for "mrrc p15,1,r0,r1,cr14" with the bytes for "mov r0,#0". If the code is 32-bit ARM mode, then that's all there is to do. If the code is 16-bit Thumb mode, then over-write the second 16-bit word with "mov r1,#0". Your initial report said "(thumb)", but perhaps that is inaccurate. |