有什么方法可以告诉编译器为某个架构构建了一个过程中涉及的任何共享库或可执行文件吗?
我假设以下内容:
- 调用一个函数,该函数不存在于当前对象文件中,编译器需要考虑该所谓的函数是(可能)不是为同一体系结构构建的,并且做诸如Vzeroupper之类的令人讨厌的事情,并且无法保留事物同时,在寄存器中。
有什么办法告诉编译器,情况并非如此?
因此,编译器可以假设,所有共享库(可能除了某些系统库除外)都是为相同的体系结构构建的,并且当调用位于另一个共享对象内的代码时,无需Vzeroupper。
我认为这可以通过与-flto进行部分完成。但是我不确定如何为共享图书馆实现这一目标。
I assume the following:
- calling into a function, which does not reside in the current object file, the compiler needs to consider that this called function was (likely) not built for the same architecture and do such nasty things as VZEROUPPER and cannot keep things in registers meanwhile.
Is there any way to tell the compiler, that this is not the case?
So that the compiler can assume, that all shared libraries (potentially except certain system libraries) are build for the same architecture and that there is no need for VZEROUPPER when calling into code located inside another shared object.
I think this can partially be accomplished by building with -flto. But I'm not certain how to accomplish this for shared libraries.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论