简体   繁体   English

有没有关于优化不会出现在EXE中的DLL的警告?

[英]Are there any caveats about optimizing a DLL that wouldn't appear in a EXE?

I am generally familiar with the sorts of optimizations performed by the -O2 or -O3 switches. 我通常熟悉-O2或-O3开关执行的各种优化。

I have been bitten a couple of times now by issues that are specific to building a DLL that don't appear in writing a flat executable, so before I start turning on optimizations are there any "gotcha"s that I should be aware of? 我现在被一些特定于构建DLL的问题咬了几次,这些问题在编写平面可执行文件时没有出现,所以在我开始优化之前,我应该注意哪些“问题”?

EXE中的死代码消除基本上以main作为可达性的单个根开始,但DLL的每个导出函数都是单独的根。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM