gpt4 book ai didi

c++ - 用于检测 C++ 中 ABI 中断的静态分析工具

转载 作者:IT老高 更新时间:2023-10-28 12:57:08 26 4
gpt4 key购买 nike

打破带有 C++ 接口(interface)的 DSO/共享库的二进制向后兼容性并不难。也就是说,是否有一个静态分析工具可以帮助检测这种 ABI 中断,如果它有两组不同的头文件:DSO 的早期状态和当前状态的那些(也许还有 DSO)?欢迎提供免费和商业产品建议。

如果它还可以警告不良做法,例如DSO接口(interface)中的内联函数和默认函数参数,那就太好了。

最佳答案

abi-compliance-checker - 用于检查共享 C/C++ 库 (DSO) 的向后二进制/源代码级兼容性的工具:

A tool for checking backward binary and source-level compatibility of a C/C++ library. The tool checks header files and shared libraries of old and new versions and analyzes changes in API and ABI (ABI=API+compiler ABI) that may break binary and/or source compatibility: changes in calling stack, v-table changes, removed symbols, renamed fields, etc.

enter image description here

icheck - C 接口(interface) ABI/API 检查器:

A tool for statically checking C interfaces for API and ABI changes. All changes to type declarations that can cause ABI changes should be detected, along with most API changes. icheck is intended for use with libraries, as a method of preventing ABI drift.

shlib-compat - 带有符号版本控制的共享库的 ABI 兼容性检查器:

shlib-compat uses dwarf debugging symbols to recreate and compare definitions of exported symbols, including function arguments and structural types.

您也可能对 linux upstream tracker 感兴趣和 linux abi tracker服务。它们都由 abi-compliance-checker 工具提供支持。

关于c++ - 用于检测 C++ 中 ABI 中断的静态分析工具,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1969916/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com