美文网首页
__attribute__((used,section...))

__attribute__((used,section...))

作者: Acton393 | 来源:发表于2020-08-07 11:20 被阅读0次

用法:

char *kChinaPYG __attribute((used, section("__DATA, ChinaPYG"))) = "ChinaPYG.CoM";
char *kDllHook __attribute((used, section("__DATA, DllHook"))) = "DllHook.CoM";

使用 used字段,即使没有任何引用,在Release下也不会被优化

转自 https://www.dllhook.com/post/195.html

相关文章

网友评论

      本文标题:__attribute__((used,section...))

      本文链接:https://www.haomeiwen.com/subject/fphfdktx.html