-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[plugin] When dynamic linking, R15 is clobbered by a global variable access and is used here: 03578 #154
Comments
看来插件模式不能用寄存器R15,这个比较麻烦,我先看看。 |
Hi @fzzf678 , 目前 sm2/sm3/sm9/zuc 的amd64汇编实现,都使用了R15寄存器,由于AMD64寄存器本来就比较少:
所以,真要使用插件模式,目前唯有使用purego编译选项(-tags=purego),而且目前只支持整个项目的purego编译选项,不支持分sm2/sm3/sm4/sm9/zuc等的编译选项(这个可以改进)。 |
@emmansun thks,使用 purego 选项可以编译通过。目前看来是只有这一种解决方法了吧 |
是的,只是性能就也是purego的性能了,目前可以改进的是,增加一些算法级别的编译选项(sm2purego/sm3purego/sm9purego/zucpurego,或者定义一个plugin编译选项),这样插件模式也能使用amd64汇编实现的sm4等。如果不能接受这种编译选项下的性能,建议使用非插件模式。 |
@emmansun 了解了 |
为amd64 plugin编译提供汇编支持
|
v0.20.2 |
build plugin 时候遇到这个问题,请教下是什么原因
go version:
msg:
The text was updated successfully, but these errors were encountered: