You cannot use extensions compiled for one architecture (CorePure64) in another architecture (piCore) - this why you get the error "wrong ELF class: ELFCLASS64".
In addition, if you use an extension from an earlier version (8.x) of the same architecture, you run the risk that one of its dependencies has been updated in the most recent version (13.x) and is no longer compatible.
piCore-8.x uses openssl-1.0.2, which is not compatible with piCore-13.x openssl-1.1.1.